php.net |  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
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: storm at xcl dot ru
New email:
PHP Version: OS:

 

 [2005-01-23 10:44 UTC] storm at xcl dot ru
Description:
------------
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=127.0.0.1', 'user', 'pass');
$t->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_WARNING);
$x = $t->prepare('SELECT * FROM table');
$x->execute();

while($row = $x->fetch())
{
	print_r($row);
}

$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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-09 01:06 UTC] wez@php.net
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: Thu Dec 12 06:01:28 2024 UTC