note 69335 added to function.pdo-prepare
| From: | william dot clarke at gmail dot com | Date: | Thu, 31 Aug 2006 22:58:31 +0000 |
| Subject: | note 69335 added to function.pdo-prepare | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116575@lists.php.net to get a copy of this message | ||
Surely if you want to use prepared statements that way you should use the syntax in the second
example:
eg.
instead of:
select id,name from demo_de where name LIKE :name OR name=:name
use:
select id,name from demo_de where name LIKE ? OR name=?
I believe you are supposed to either use distinct named parameters (name, name1) OR anonymous
parameters (?s)
----
Server IP: 203.220.0.234
Probable Submitter: 139.86.2.15 (proxied: 139.86.4.59)
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.pdo-prepare.php
Edit -- https://master.php.net/note/edit/69335
Del: integrated -- https://master.php.net/note/delete/69335/integrated
Del: useless -- https://master.php.net/note/delete/69335/useless
Del: bad code -- https://master.php.net/note/delete/69335/bad+code
Del: spam -- https://master.php.net/note/delete/69335/spam
Del: non-english -- https://master.php.net/note/delete/69335/non-english
Del: in docs -- https://master.php.net/note/delete/69335/in+docs
Del: other reasons-- https://master.php.net/note/delete/69335
Reject -- https://master.php.net/note/reject/69335
Search -- https://master.php.net/manage/user-notes.php