note 100494 added to pdostatement.bindparam
| From: | ReK_ at osu1 dot php dot net | Date: | Tue, 19 Oct 2010 17:59:48 +0000 |
| Subject: | note 100494 added to pdostatement.bindparam | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173286@lists.php.net to get a copy of this message | ||
This confused me for some time because it is never explicitly mentioned, but PDO will automagically
encapsulate parameters for you, so a prepared query that is manually escaped like so:
"INSERT INTO table (column) VALUES (':value');"
Will actually end up being double-quoted and can cause problems.
----
Server IP: 92.48.119.85
Probable Submitter: 24.80.224.57
----
Manual Page -- http://www.php.net/manual/en/pdostatement.bindparam.php
Edit -- https://master.php.net/note/edit/100494
Del: integrated -- https://master.php.net/note/delete/100494/integrated
Del: useless -- https://master.php.net/note/delete/100494/useless
Del: bad code -- https://master.php.net/note/delete/100494/bad+code
Del: spam -- https://master.php.net/note/delete/100494/spam
Del: non-english -- https://master.php.net/note/delete/100494/non-english
Del: in docs -- https://master.php.net/note/delete/100494/in+docs
Del: other reasons-- https://master.php.net/note/delete/100494
Reject -- https://master.php.net/note/reject/100494
Search -- https://master.php.net/manage/user-notes.php