From:             vtsupermok at gmail dot com
Operating system: win
PHP version:      5.2.5
PHP Bug Type:     PDO related
Bug description:  fetchall more than one times

Description:
------------
I have try to ext a PDO object, and then fetch a PDO result set more than
1 time, the result is the first time result contains record, after that, it
has no records. Is it a bug or not?





Reproduce code:
---------------
$resultSet=$result->fetchAll(PDO::FETCH_ASSOC);
var_dump($resultSet);

$resultSet2=$result->fetchAll(PDO::FETCH_ASSOC);
var_dump($resultSet2);


Expected result:
----------------
array(1) { [0]=>  array(5) { ["userID"]=>  string(1) "1" ["userName"]=> 
string(5) "admin" ["alias"]=>  string(5) "Admin" ["groupID"]=>  string(1)
"0" ["lstLoginTime"]=>  string(19) "2008-03-31 11:38:23" } } 

array(1) { [0]=>  array(5) { ["userID"]=>  string(1) "1" ["userName"]=> 
string(5) "admin" ["alias"]=>  string(5) "Admin" ["groupID"]=>  string(1)
"0" ["lstLoginTime"]=>  string(19) "2008-03-31 11:38:23" } } 

Actual result:
--------------
array(1) { [0]=>  array(5) { ["userID"]=>  string(1) "1" ["userName"]=> 
string(5) "admin" ["alias"]=>  string(5) "Admin" ["groupID"]=>  string(1)
"0" ["lstLoginTime"]=>  string(19) "2008-03-31 11:38:23" } } 

array(0) { }

-- 
Edit bug report at http://bugs.php.net/?id=44576&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44576&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44576&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44576&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44576&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44576&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44576&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44576&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44576&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44576&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44576&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44576&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44576&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44576&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44576&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44576&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44576&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44576&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44576&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44576&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44576&r=mysqlcfg

Reply via email to