|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-31 10:43 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 17:00:01 2025 UTC |
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) { }