Re: Insert string with " ' "
| From: | Jayme Jeffman Filho | Date: | Wed, 26 Jul 2000 00:27:09 +0000 |
| Subject: | Re: Insert string with " ' " | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-1489@lists.php.net to get a copy of this message | ||
Try the slash ... VALUES (\"$var\")...
Jayme.
-----Mensagem original-----
De: Mirko Nalesso <okrim74@libero.it>
Para: php-db@lists.php.net <php-db@lists.php.net>
Data: Terça-feira, 25 de Julho de 2000 09:58
Assunto: [PHP-DB] Insert string with " ' "
>Hi people,
>I have a problem when I try to insert a string containing the character
>" ' ".I'm working with IBM DB2 v6.1 and php4. Example:
>
>....
>$text = "I saw Tom's shoes";
>$query = "INSERT INTO documents VALUES ('$text');
>....
>
>DB2 thinks that "I saw Tom" is the string to insert and "s shoes" is an
>error. What can I do?
>
>Mirko.
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
>For additional commands, e-mail: php-db-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>