Hi again.
I'm still trying but I can't do it.
I have tried this :
$values=$values.addslashes("'".$value).addslashes("'");
The result of this would be something like this
INSERT INTO Carrocerias VALUES (\'Ber\',\' Berlina\')
The mysql_errno is 1064.
I've tried mysql_escape_tring with the same result.
Before INSERT statement I put this
mysql_escape_string("\");
but it didn't work.
Can anyone where I could found an example ? I have looked on the online
manual of php but they are SELECT examples, there are no INSERT examples.
I ' m a newbie PHP programmer .
Thanks again,
Jorge Giménez
----- Original Message -----
From: "Jorge Giménez Mayorgas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 28, 2001 6:48 PM
Subject: [PHP-DB] Special character on an INSERT statement
Hi .
I'm trying to do this on an INSERT statement.
$sql= "INSERT .... (' TONS OF CD'S ')
or any phrase with the character ' .
Obviously it gives an error when execeting mysql_query.
How can I do it ?
Thanks,
Jorge Giménez
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]