php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #64664 Reinitialize fetchAll
Submitted: 2013-04-18 06:50 UTC Modified: 2013-06-19 07:23 UTC
From: vtap at clubinternet dot fr Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.4.14 OS: Windows 7
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: vtap at clubinternet dot fr
New email:
PHP Version: OS:

 

 [2013-04-18 06:50 UTC] vtap at clubinternet dot fr
Description:
------------
$sql = "SELECT f1, f2 FROM test;";
$res = $pdo->query($sql);

$f1= $res->fetchAll(PDO::FETCH_COLUMN,0);
$f2= $res->fetchAll(PDO::FETCH_COLUMN,1);

$f1 is OK but $f2 is an empty array. Is there a way to reinitialize the cursor ?
I know I can rerun the query but wanted to know if it could be avoided.
Thanks.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-19 07:23 UTC] ab@php.net
-Status: Open +Status: Not a bug
 [2013-06-19 07:23 UTC] ab@php.net
This isn't a support forum, but there's no way to rewind without executing the 
statement again.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 10:01:28 2024 UTC