Re: Special character on an INSERT statement
| From: | Andrey Hristov | Date: | Tue, 28 Aug 2001 16:50:52 +0000 |
| Subject: | Re: Special character on an INSERT statement | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-11908@lists.php.net to get a copy of this message | ||
Use addslashes() when inserting/updating the DB
use stripslashes() when extracting.
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
----- Original Message -----
From: "Jorge Giménez Mayorgas" <jorgegmamg@hotmail.com>
To: <php-db@lists.php.net>
Sent: Tuesday, August 28, 2001 7: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