|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56276 Bug in PDOStatement::prepare()
Submitted: 2005-01-23 10:44 UTC Modified: 2005-02-09 06:58 UTC
From: storm at xcl dot ru Assigned:
Status: Closed Package: PDO (PECL)
PHP Version: 5_0 CVS-2005-01-23 (dev) OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
27 - 24 = ?
Subscribe to this entry?

 [2005-01-23 10:44 UTC] storm at xcl dot ru
After downloading new versions of php_pdo.dll and php_pdo_mysql.dll today (23 january 2005) the script which I provided below stopped working. With version that I had before it was working perfectly. This happenes with:

PHP 5.0.4-dev CVS 2005-01-23
Apache 2.0.52
Windows XP SP2
PDO 5.0.4-dev CVS 2005-01-23
PDO_MYSQL 5.0.4-dev CVS 2005-01-23

I don`t have any additional extensions except php_pdo, php_pdo_mysql and mysql itself. No specific changes to my php.ini too.

Reproduce code:
$t = new PDO('mysql:dbname=db;host=', 'user', 'pass');
$x = $t->prepare('SELECT * FROM table');

while($row = $x->fetch())

$t = NULL;

Expected result:
I expected to get all rows from my table.

Actual result:
Instead I got this: Warning: PDOStatement::execute() [function.execute]: SQLSTATE[HY000]: General error: 1065 Query was empty in C:\blah\index.php on line 53


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-09 01:06 UTC]
Please try the latest PECL releases for PDO and PDO_MYSQL.
 [2005-02-09 06:58 UTC] storm at xcl dot ru
Thank you wez, everything is working perfectly right now.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 25 18:01:32 2024 UTC