#44576 [Opn->Bgs]: fetchall more than one times
| From: | derick@php.net | Date: | Mon, 31 Mar 2008 10:43:57 +0000 |
| Subject: | #44576 [Opn->Bgs]: fetchall more than one times | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123802@lists.php.net to get a copy of this message | ||
ID: 44576
Updated by: derick@php.net
Reported By: vtsupermok at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: PDO related
Operating System: win
PHP Version: 5.2.5
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Not a bug, it's meant like this.
Previous Comments:
------------------------------------------------------------------------
[2008-03-31 10:41:20] vtsupermok at gmail dot com
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 this bug report at http://bugs.php.net/?id=44576&edit=1