#36159 [NEW]: Running simple prepared statement SELECT fails (postgres)
From: edrozenberg at pobox dot com
Operating system: Windows XP SP2
PHP version: 5.1.2
PHP Bug Type: PDO related
Bug description: Running simple prepared statement SELECT fails (postgres)
Description:
------------
Since upgrading PHP from 5.1.1 to 5.1.2, running a simple prepared
statement SELECT fails. Error info from print_r($stmt->errorInfo()):
Array ( [0] => 00000 )
I have experienced no such problems on Linux 2.4 with PHP 5.1.2 compiled
from source.
Reproduce code:
---------------
private function dbSel($query, $values)
{
$stmt = $this->dbh->prepare($query);
if ( ! $stmt->execute($values) )
{
print_r($stmt->errorInfo());
$this->dbErrorGet($stmt);
return(0);
}
$this->rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
return(1);
}
----------------------------------------------------------
$query: "SELECT * \n FROM t_workfile"
$values: array of <blank>
Expected result:
----------------
$stmt->execute($values) should return TRUE and
there should be rows that can be fetched
Actual result:
--------------
$stmt->execute($values) returns false and the print_r($stmt->errorInfo())
statement prints "Array ( [0] => 00000 )"
--
Edit bug report at http://bugs.php.net/?id=36159&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36159&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36159&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36159&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36159&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36159&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36159&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36159&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36159&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36159&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36159&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36159&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36159&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36159&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36159&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36159&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36159&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36159&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36159&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36159&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36159&r=mysqlcfg
Thread (6 messages)
- edrozenberg at pobox dot com