note 96083 added to pdo.prepared-statements
| From: | danteshamest at gmail dot com | Date: | Mon, 08 Feb 2010 03:20:10 +0000 |
| Subject: | note 96083 added to pdo.prepared-statements | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165737@lists.php.net to get a copy of this message | ||
Example #6 is a big vague on which lines are misusing the placeholder.
This is correct usage:
<?php
$stmt = $dbh->prepare("SELECT * FROM REGISTRY where name LIKE '%?%'");
$stmt->execute(array($_GET['name']));
?>
This is NOT correct:
<?php
$stmt = $dbh->prepare("SELECT * FROM REGISTRY where name LIKE '%?%'");
$stmt->execute(array($_GET['name']));
?>
----
Server IP: 64.71.164.2
Probable Submitter: 221.133.38.62
----
Manual Page -- http://www.php.net/manual/en/pdo.prepared-statements.php
Edit -- https://master.php.net/note/edit/96083
Del: integrated -- https://master.php.net/note/delete/96083/integrated
Del: useless -- https://master.php.net/note/delete/96083/useless
Del: bad code -- https://master.php.net/note/delete/96083/bad+code
Del: spam -- https://master.php.net/note/delete/96083/spam
Del: non-english -- https://master.php.net/note/delete/96083/non-english
Del: in docs -- https://master.php.net/note/delete/96083/in+docs
Del: other reasons-- https://master.php.net/note/delete/96083
Reject -- https://master.php.net/note/reject/96083
Search -- https://master.php.net/manage/user-notes.php