Page 1 of 1

Qoute safe

Posted: Wed May 21, 2003 8:51 am
by mzfp2
Just downloaded a dump file from my database server provider, and tried running it on my own MYSQL server, howeer i realised some inserts failed because of qoutes.

What is the safe way to add strings to a database, regardless of the qoutes that may or may not appear in the string?

Posted: Wed May 21, 2003 7:39 pm
by McGruff
Can you escape text in the web database and THEN create a dump file?

Posted: Thu May 22, 2003 5:11 am
by mzfp2
Not quite sure what you mean by escaping text :oops:

Posted: Thu May 22, 2003 5:17 am
by lcidw
An scape character is for example a backslash in front of another character to make sure it's not implemented wrong i believe. Have a look at stripslashes() or quotemeta()