Jump to content

[SOLVED] Server escaping string in a weird way for database query


Alex-Grim

Recommended Posts

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's set up and you\''ve rebooted, log into your desktop and look for the network i' at line 1

The part where it says "you\''ve" is what concerns me. In my code, i tell it to replace a single quote with two single quotes. I don't know where the hell the backlash is coming from, but i'm guessing that php is doing it automatically. How can i stop this, so that it doesn't convert my words into weird characters (see the characters in the article i just posted at the link below to see what i'm talking about). Because that backlash is in there, and because i'm replacing single quotes, php is interpreting the slash as whitespace type stuff, and generating wired characters.

 

http://linuxintro.com/?con=Fstab01

 

Thanx

I thought it was MSSQL that you escape a single quote with another single quote....

 

Anyway, you might want to turn off magic quotes if they're on.  Or, if you can't turn them off, just clean your get/post/cookie arrays your self if needed.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.