Re: mysql - image storing

From: Date: Wed, 19 Jan 2005 05:51:17 +0000
Subject: Re: mysql - image storing
References: 1 2 3 4 5 6  Groups: php.db 
Request: Send a blank email to php-db+get-38220@lists.php.net to get a copy of this message
Martin Norland wrote:
Jochem Maas wrote:
I was always under the impression that single quotes (assuming you are delineating you args with single quotes) should (officially) be escaped with another single quote - although backslash also works: "INSERT INTO status (hunger) values ('I''ve just eaten.');" ...alot of really old code of mine is full of stuff like: $var = str_replace("'","''",$var); but maybe that just MTAM(tm) working for me - (thats a reference to a bit of humour from another thread btw - MTAM is not a technology :-)
AFAIK - for Sybase and CSV yes, otherwise no (in general). Maybe it's a compatibility option? Still, there are perfectly valid reasons to have multiple ''s. (why, there's one now - sort of...)
ok - cheers, just for the record If I wanted to insert your sentence: 'Still, there are perfectly valid reasons to have multiple ''''s' :-)
Cheers,


« previous php.db (#38220) next »