php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sjoerd-php at linuxonly dot nl
New email:
PHP Version: OS:

 

 [2009-09-21 19:15 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-13 22:13 UTC] 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-11-13 22:13 UTC] vrana@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 19:01:29 2024 UTC