|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2012-02-10 11:15 UTC] shol_ at hotmail dot com
  [2013-06-12 01:51 UTC] ssufficool@php.net
 
-Package: PDO_DBLIB
+Package: PDO related
  [2014-01-01 12:42 UTC] felipe@php.net
 
-Package: PDO related
+Package: PDO DBlib
  [2014-10-25 04:33 UTC] ssufficool@php.net
 
-Assigned To:
+Assigned To: ssufficool
  [2016-06-26 18:15 UTC] ssufficool@php.net
 
-Assigned To: ssufficool
+Assigned To:
  [2016-09-12 22:14 UTC] adambaratz@php.net
 
-Status: Open
+Status: Wont fix
-Type:   Bug
+Type:   Feature/Change Request
  [2016-09-12 22:14 UTC] adambaratz@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 00:00:01 2025 UTC | 
Description: ------------ I have a mssql table. Something like this: id | field1 ----------- 1 | a 2 | b 3 | c ----------- I want to move backward (from last to first), in my PDOStatment. But... Reproduce code: --------------- $db = new PDO('dblib:host=192.168.1.3:1433;dbname=db', 'user', 'password', array(PDO::ATTR_PERSISTENT => true)); $stmt = $db->prepare('select * from table', array(PDO::ATTR_CURSOR, PDO::CURSOR_SCROLL)); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_BOTH, PDO::FETCH_ORI_LAST); while ($row = $stmt->fetch(PDO::FETCH_BOTH, PDO::FETCH_ORI_PRIOR)) { print $row[0] . "\t" . $row[1] . "\n"; } $stmt = null; ?> Expected result: ---------------- ------- 3 | c 2 | b 1 | a ------- Actual result: -------------- ------- 1 | a 2 | b 3 | c -------