php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41509 PDO fetchAll for InterBase missing first row
Submitted: 2007-05-27 02:26 UTC Modified: 2007-05-29 20:40 UTC
From: taylor dot ren at gmail dot com Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.2.2 OS: Vista Business
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: taylor dot ren at gmail dot com
New email:
PHP Version: OS:

 

 [2007-05-27 02:26 UTC] taylor dot ren at gmail dot com
Description:
------------
The code is simple: I just want to select 5 rows from my InterBase database using PDO. 

A live demo can be found: http://www.rsywx.net/smarty/test01.php. 

It is very clear that the first row is not fetched (or missing) so the output is missing BOOKID=00001 and related information. 

Same mechanism works fine for MySQL. 

Reproduce code:
---------------
$PDO1=new PDO("firebird:dbname=localhost:f:\\data\\book.ib", "iis", "iis");
print_r($PDO1->query('SELECT bookid, title, author FROM book order by bookid rows 5')->fetchAll(PDO::FETCH_ASSOC));


Expected result:
----------------
Should have 5 records with BOOKID from 00001 to 00005.

Actual result:
--------------
Now 00001 is missing. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-29 20:40 UTC] tony2001@php.net
See bug #35386.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 14:01:30 2025 UTC