#40740 [Com]: PDO::execute() errors when parameters are used in LIMIT clause
| From: | nduteil at freedev dot org | Date: | Wed, 18 Feb 2009 08:51:01 +0000 |
| Subject: | #40740 [Com]: PDO::execute() errors when parameters are used in LIMIT clause | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133945@lists.php.net to get a copy of this message | ||
ID: 40740
Comment by: nduteil at freedev dot org
Reported By: phpbugs at filofox dot com
Status: No Feedback
Bug Type: PDO related
Operating System: Linux Debian Sarge 3.1
PHP Version: 5.2.1
Assigned To: wez
New Comment:
Hi,
Still not fixed in the 5.2.8 release. If PDOStatement::bindParam or
PDOStatement::bindValue is used to specified the parameter type (ie :
PDO::PARAM_INT) everything works as expected. Not forcing the parameter
type to integer generates an error in Mysql.
Previous Comments:
------------------------------------------------------------------------
[2008-11-26 10:57:40] miha dot vrhovnik at domenca dot si
I re-compiled pdo and pdo_mysql from 5.2.7 RC4 and overwritten
libraries from php 5.2.6. Is this enough? If it is, then this issue is
not fixed.
------------------------------------------------------------------------
[2008-11-12 01:00:01] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2008-11-04 15:25:02] felipe@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2008-11-02 03:43:00] dev at bcdiv dot com
PHP v 5.2.6
MySQL v 5.0.51b-community-nt
Vista Ultimate SP1
Similar (though not exactly) usage of PDO to run a stored procedure w/
a parameter that sets the number in a limit clause does not replicate
error.
$dbc = new DBO;
$dbc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sproc = $dbc->prepare(CALL spLimitProc ?);
$sproc->bindParam(1,$limit, PDO::PARAM_INT);
$result = $sproc->execute();
Result returns table rows as expected (similar to direct MySQL sproc
call).
Perhaps resolved or not experienced across platforms?
------------------------------------------------------------------------
[2008-08-29 01:46:16] jmalis at malisphoto dot com
This problem is still not fixed in PHP 5.2.6
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/40740
--
Edit this bug report at http://bugs.php.net/?id=40740&edit=1