#37401 [Opn->Csd]: PDO statement preparing - missing example
| From: | didou@php.net | Date: | Mon, 22 Jan 2007 01:12:34 +0000 |
| Subject: | #37401 [Opn->Csd]: PDO statement preparing - missing example | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969374943@lists.php.net to get a copy of this message | ||
ID: 37401
Updated by: didou@php.net
Reported By: stochnagara at hotmail dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2006-05-10 18:42:19] stochnagara at hotmail dot com
Description:
------------
The example 1 on page
http://www.php.net/manual/en/function.pdo-prepare.php
shows how we can prepare an SQL statement with named parameters.
The example shows that parameters are passed in this way:
$sth->execute(array(':calories' => 150, ':colour' => 'red'));
I think there should be one more example that shows using parameters
without ':' in front of each parameter, e.g.
$sth->execute(array('calories' => 150, 'colour' => 'red'));
This would be a valuable example because most of the people do not know
this convinient way of passing parameters without the need to foreach an
array and add ':' in front of every key.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37401&edit=1