Register new account
Edit account
Search

Ancient Domains Of Mystery, forum overview / General / wtf?

Online users ( Unknown)
Application object not working properly at the moment, no clue who is online...

* Numbers in parentheses are the number of minutes since the user last loaded a page. Logged-in users time out after 40 minutes (unless they manually log out), lurkers and anonymous posters after 20.

Portrait
Duke Ravage
Registered user
Gravebane Zombie


Last page view:

5666 days, 9 hours, 22 minutes and 18 seconds ago.
Posted on Friday, April 30, 2004 at 00:22 (GMT -5)

i seem to be having difficulties posting and creating new threads... it just kinda freaks out and creates the thread, then forgets to put my post in, gives me an error, and then deletes the thread next time i load the page.


ivan.sourceforge.net
Portrait
Duke Ravage
Registered user
Gravebane Zombie


Last page view:

5666 days, 9 hours, 22 minutes and 18 seconds ago.
Posted on Friday, April 30, 2004 at 00:23 (GMT -5)

well this one created, but i'm having problems over on the stories board...


ivan.sourceforge.net
Portrait
Duke Ravage
Registered user
Gravebane Zombie


Last page view:

5666 days, 9 hours, 22 minutes and 18 seconds ago.
Posted on Friday, April 30, 2004 at 00:24 (GMT -5)

the error is an HTTP 500 error, by the way.


ivan.sourceforge.net
Portrait
Duke Ravage
Registered user
Gravebane Zombie


Last page view:

5666 days, 9 hours, 22 minutes and 18 seconds ago.
Posted on Friday, April 30, 2004 at 00:47 (GMT -5)

wow. it vanished. odd.
perhaps it had to do with the apostrophe i had in the title that i took out. hmm... odd.


ivan.sourceforge.net
Portrait
Ekaterin
Moderator on this forum

Last page view:

5769 days, 2 hours, 53 minutes and 44 seconds ago.
Posted on Friday, April 30, 2004 at 04:06 (GMT -5)

Yes, I had problems once creating a thread with an apostrophe in the name. I was trying to call it "I killed Blup's mum" and it wouldn't let me create it, whether or not I was logged in.

BTW, a belated Happy Birthday to you! I had my birthday this month as well (my 30th).
Portrait
Jan Erik
Administrator

Last page view:

12 hours, 12 minutes and 13 seconds ago.
Posted on Monday, May 03, 2004 at 07:22 (GMT -5)

Yeah, silly bug that. Took me a while to track down because I clearly dealt with apostrophes in the code.

Just realised however that my function didn't only output a "fixed" version of a sting, it also "fixed" the source variable, so when I called that function on the same variable a second time things got messed up because then the variable was already fixed and trying to fix it a second time only broke it... Err, don't know if that made any sence, but it's fixed now anyway. Use apostrophes to your heart's content :P


Jan Erik Mydland
HoF admin
Portrait
Taz
Registered user
Registered user


Last page view:

5029 days, 15 minutes and 17 seconds ago.
Posted on Monday, May 03, 2004 at 09:31 (GMT -5)

let me see if i get this: two rights make a wrong?


Taz: A potion of gain attributes (4s) is lying here. Suddenly a stone block hits your head! Something on the ground is smashed to pieces!
PeanutGod: Awwww no! How harsh is that! This is where you need the artefact 'mop and bucket'.
Portrait
Jan Erik
Administrator

Last page view:

12 hours, 12 minutes and 13 seconds ago.
Posted on Monday, May 03, 2004 at 11:35 (GMT -5)

Well not realy, The thing is apostrophes have a special meaning in SQL (the language used to commiunicate with the database). To be precise they are used to indicate the start and stop of a string value (you know, text)), so if you have an apostrophe in a string and try to insert it into the database it will think the apostrophe is in fact the end of the sting and then it will generate a syntax error when it encounter stuff after the "end" of the string...

The solution is to simply use an escape sequence, by replacing all apostrophes in the string by double apostrophes (two consecutive apostrophes that is), this works just fine.

Problem here was I accudentaly run the "escaper" twise so I ended up with quadruple the amount of apostrophes. That's still valid SQL unfortunately it also changed the "value" of the string so the code that retrieved the newly created thead in order to insert the new message into if didn't find anyting because instead of for example:

It's cool

it would look for:

it''s cool

With no threat to insert the message into the code will then crash, and you would end up with an empty thread that was then deleted automaticaly when you reloaded the page.

Quite logical when you think about it realy :P


Jan Erik Mydland
HoF admin
duke ravage
Unregistered user
Posted on Monday, May 03, 2004 at 17:51 (GMT -5)

as a fellow programmer i feel your pain... :) although i do C++, i don't know anything about SQL.
Portrait
Taz
Registered user
Registered user


Last page view:

5029 days, 15 minutes and 17 seconds ago.
Posted on Tuesday, May 04, 2004 at 01:29 (GMT -5)

lol, yeah it does make sense. one of the coolest things about programming (in my opinion) is thinking up all these ways to solve problems :p


Taz: A potion of gain attributes (4s) is lying here. Suddenly a stone block hits your head! Something on the ground is smashed to pieces!
PeanutGod: Awwww no! How harsh is that! This is where you need the artefact 'mop and bucket'.

Color mixer:
Red: Green: Blue: HTML color code: result:      
Your Name: Check to login:

Your Message:


Read the
formating help
Are you a spambot? Yes No Maybe Huh?
Create poll? Yes No   What is this?
Poll question: