Having escaped quotes problem in DB_DataObject (I think)

From: Date: Fri, 15 Aug 2003 02:22:58 +0000
Subject: Having escaped quotes problem in DB_DataObject (I think)
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7215@lists.php.net to get a copy of this message
My apologies in advance if this is a DB rather than a DB_DataObject question, but here it is: I'm using DataObject's insert() to run inserts, and when values being inserted contain single or double quotes, they're being escaped twice, it seems, when the query is built. So, [this has quote's] becomes [this has quote\\\'s], as in: INSERT INTO table (a,b,c,quote) VALUES ('one' , 2 , 'three' , 'this has quote\\\'s ') I have magic_quotes_gpc = On in php.ini and so don't usually worry about this. I looked through DataObjects code and couldn't find out where this occurs; I do see that DB's quote() is called, but that seems to escape Sybase style, i.e. ' to ''. Could someone please point me in the right direction? Thanks, Andy

« previous php.pear.general (#7215) next »