Forum Moderators: coopster

Message Too Old, No Replies

MySQL doesnt like fields with single quotes in them?

' is causing me problems

         

will1480

3:02 am on Apr 29, 2004 (gmt 0)

10+ Year Member



I am having trouble addiny a row to my shopping cart when a field has a single quote, ' , in it. There might be other characters causing problems as well. Has anyone had these problems before and give me some insight? I am using varchar for those fields

willybfriendly

3:08 am on Apr 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need to escape the single quotes. Try mysql_escape() if you are using PHP.

WBF

jatar_k

5:48 am on Apr 29, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



mysql_escape_string() [ca.php.net]