Jump to content

Special Characters


conan318

Recommended Posts

does the varchar not allow  qoutes??

 

example

August 28th an Out N' back from the Station departing 8 AM.
Then, September 11th and October 16th
We also have a fair crew riding Wollomi Wild Ride so sign up on line

this give's an error 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 '2011/08/05')' at line 1

remove the qoute ' and it works fine

August 28th an Out N back from the Station departing 8 AM.
Then, September 11th and October 16th
We also have a fair crew riding Wollomi Wild Ride so sign up on line

 

Link to comment
https://forums.phpfreaks.com/topic/243988-special-characters/
Share on other sites

If the data is escaped properly, there should be no need to use stripslashes().  Slashes aren't stored with the data unless it somehow ends up double escaped. Which brings up the point that addslashes() shouldn't be used when there's a db specific escaping function available, such as mysql_real_escape_string().

Link to comment
https://forums.phpfreaks.com/topic/243988-special-characters/#findComment-1252951
Share on other sites

If the data is escaped properly, there should be no need to use stripslashes().  Slashes aren't stored with the data unless it somehow ends up double escaped. Which brings up the point that addslashes() shouldn't be used when there's a db specific escaping function available, such as mysql_real_escape_string().

 

If that's the case then OP you should be checking if magic_quotes_gpc is on or not (off usually), since if you do get double escaped you would need the strip slashes.

 

f\\'oo

Link to comment
https://forums.phpfreaks.com/topic/243988-special-characters/#findComment-1252961
Share on other sites

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.