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
 [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

Add a Patch

Pull Requests

Add a Pull Request

History

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