|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57496 bindValue/Params don't work when linked with libmysqlclient14 / libmysqlclient15
Submitted: 2007-01-27 08:22 UTC Modified: 2011-05-26 08:20 UTC
From: dpobel at free dot fr Assigned:
Status: No Feedback Package: PDO_MYSQL (PECL)
PHP Version: 5.1.6 OS: Ubuntu Edgy Eft
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: dpobel at free dot fr
New email:
PHP Version: OS:


 [2007-01-27 08:22 UTC] dpobel at free dot fr
It seems that prepared statements with bindValue (or bindParams) don't work as expected. The two examples below should output the same things.

Configuration : 
PHP 5.1.6 (ubuntu package)
MySQL 4.1.15 (ubuntu package)
PDO_MYSQL compiled with libmysqlclient14-dev (header for MySQL 4.1) and libmysqlclient15-dev (header for MySQL 5.0) with the same result.

Reproduce code:
$db = new PDO('mysql:host=localhost;dbname=sew', LOGIN, PASSWORD);
$stmt = $db->prepare('select * from `sew_sites` where `id`=:id');
$stmt->bindValue(':id', 1);
$row = $stmt->fetchAll( PDO::FETCH_ASSOC );

$db = new PDO('mysql:host=localhost;dbname=sew', LOGIN, PASSWORD);
$stmt = $db->prepare('select * from `sew_sites` where `id`=1');
$row = $stmt->fetchAll( PDO::FETCH_ASSOC );

Expected result:
These two scripts should output exactly same data.

Actual result:
> tigrou@dedipwet[]:~/tmp$ php5 test_pdo.php 
array(0) {
> tigrou@dedipwet[]:~/tmp$ php5 test_pdo_simple.php 
array(1) {
  array(4) {
    string(1) "1"
    string(15) "~tigrou/"
    string(14) ""
    string(5) "60000"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-29 17:44 UTC] dpobel at free dot fr
If I compiled PDO_MYSQL with libmysqlclient12-dev (header for MySQL 4.0), it works correctly... don't know if it's a PDO problem or a Ubuntu package problem ?
 [2008-05-13 09:00 UTC] johannes at schlueters dot de
Could you please try with newer versions. Thanks.
 [2011-05-26 08:20 UTC] johannes at schlueters dot de
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC