#49614 [Opn->Csd]: PDOStatement::execute assumes string values in array
| From: | vrana@php.net | Date: | Fri, 13 Nov 2009 22:13:24 +0000 |
| Subject: | #49614 [Opn->Csd]: PDOStatement::execute assumes string values in array | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3144@lists.php.net to get a copy of this message | ||
ID: 49614
Updated by: vrana@php.net
Reported By: sjoerd-php at linuxonly dot nl
-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:
------------------------------------------------------------------------
[2009-11-13 22:13:18] svn@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=290713
Log: Treat with strings (bug #49614)
------------------------------------------------------------------------
[2009-09-21 19:15:43] sjoerd-php at linuxonly dot nl
Description:
------------
The PDOStatement->execute() method takes an array with parameters. This
array is assumed to contain string values, but this is not documented.
The values in the array are bound to the statement with PDO_PARAM_STR
(according to pdo_stmt.c:470). This should be clarified in the
documentation. The documentation already mentions that PDO_PARAM_STR is
the default in bindParam(), but it should me mentioned again in the
documentation of execute().
This causes confusion when people try to insert other things, especialy
booleans:
Bug #44597: Postgres driver does not prepare booleans correctly
Bug #49255: PDO fails to insert boolean FALSE to MySQL in prepared
statement
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49614&edit=1