Re: mysql - image storing

From: Date: Tue, 18 Jan 2005 20:43:30 +0000
Subject: Re: mysql - image storing
References: 1 2 3 4 5  Groups: php.db 
Request: Send a blank email to php-db+get-38214@lists.php.net to get a copy of this message
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...) Cheers, -- - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital.

« previous php.db (#38214) next »