Forum Moderators: coopster

Message Too Old, No Replies

Database inserts with '

         

dkin

4:26 pm on Jul 26, 2005 (gmt 0)

10+ Year Member



Whenever I have a row in my db that has an ' I get an error whenever loading the page.

What can I do to keep it in the row but not get the error?

arran

4:44 pm on Jul 26, 2005 (gmt 0)

10+ Year Member



dkin,

Either use double quotes for your sql or escape the string using the mysql_escape_string function.

arran.

jatar_k

5:26 pm on Jul 26, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



no offence arran

from
[php.net...]

This function became deprecated, do not use this function. Instead, use mysql_real_escape_string() [php.net].

arran

6:17 pm on Jul 26, 2005 (gmt 0)

10+ Year Member



jatar_k, no offence taken. Thanks for bringing me into the 21st century :)