|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49614 PDOStatement::execute assumes string values in array
Submitted: 2009-09-21 19:15 UTC Modified: 2009-11-13 22:13 UTC
From: sjoerd-php at linuxonly dot nl Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2009-09-21 19:15 UTC] sjoerd-php at linuxonly dot nl
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-13 22:13 UTC]
Automatic comment from SVN on behalf of vrana
Log: Treat with strings (bug #49614)
 [2009-11-13 22:13 UTC]
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.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Sep 18 20:01:27 2020 UTC