note 113335 deleted from pdo.quote by salathe

From: Date: Mon, 21 Sep 2020 14:57:42 +0000
Subject: note 113335 deleted from pdo.quote by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-215393@lists.php.net to get a copy of this message
Note Submitter: mirv ---- When converting from the old mysql_ functions to PDO, note that the quote function isn't exactly the same as the old mysql_real_escape_string function. It escapes, but also adds quotes; hence the name I guess :-) After I replaced mysql_real_escape_string with $pdo->quote, it took me a bit to figure out why my strings were turning up in results with quotes around them. I felt like a fool when I realized all I needed to do was change ...\"".$pdo->quote($foo)."\"... to ...".$pdo->quote($foo)."...

« previous php.notes (#215393) next »