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,

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to