Double Quotes In Queries
| From: | pw | Date: | Wed, 27 Apr 2005 15:39:12 +0000 |
| Subject: | Double Quotes In Queries | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18963@lists.php.net to get a copy of this message | ||
Hello,
I have pearDB connected to PostgreSQL.
When I make an insert into a varchar field everything works fine,
**UNLESS** I have double quotes in my data for that field.
For example if I use the following INSERT directly in postgres it works
fine:
INSERT INTO mytable (a_text_field) VALUES ( 'one 19" monitor' );
However if I use pear and PHP to insert this record the data gets
truncated to
'one 19'
Even adding a backslash as an escape character doesn't resolve the problem.
ie:INSERT INTO mytable (a_text_field) VALUES ( 'one 19\" monitor' );
I think I must be missing something in my php.ini or something.
Is there a flag for this?
Thanks for any insights,
Peter