Page 1 of 1

Single quotes and MYSQL

Posted: Thu Oct 21, 2004 6:04 pm
by chriso
When entering data into a mysql database, I get an error when a single quote is in the text. I know this is a special character for mysql, but:

1. How can I enter a single quote in the the database? For example, a word may indicate the possessive, such as Frank's car.

2. How do I bring the single quote back to a form field with the data for editing?

Thanks.

Posted: Thu Oct 21, 2004 7:05 pm
by feyd
[php_man]addslahes()[/php_man] or better [php_man]mysql_escape_string()[/php_man] or it's brother..