#47845 [Ver->Csd]: PDO_Firebird omits first row from query
ID: 47845
Updated by: felipe@php.net
Reported By: piotrt at itisit dot pl
-Status: Verified
+Status: Closed
Bug Type: PDO related
Operating System: Windows XP
PHP Version: 5.2.9
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
The fix has been backported to 5.2CVS.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2009-04-03 10:56:14] felipe@php.net
I can reproduce it. This just was fixed in 5.3+ (bug #35386)
------------------------------------------------------------------------
[2009-03-31 08:03:20] piotrt at itisit dot pl
Description:
------------
PDO_Firebird omits first row from query.
Reproduce code:
---------------
First create sample table:
CREATE TABLE PDO_BUG(
ID Integer NOT NULL,
TEXTFIELD Varchar(20),
NUMFIELD Numeric(18,2),
PRIMARY KEY (ID)
);
INSERT INTO PDO_BUG (ID, TEXTFIELD, NUMFIELD) VALUES ('1', 'val1',
'992831.00');
INSERT INTO PDO_BUG (ID, TEXTFIELD, NUMFIELD) VALUES ('2', 'val2',
'488111.00');
INSERT INTO PDO_BUG (ID, TEXTFIELD, NUMFIELD) VALUES ('3', 'val3',
'1109911.00');
$dbh = new
PDO('firebird:dbname=localhost:database','SYSDBA','masterkey');
$sql = "select * from PDO_BUG order by ID" ;
$stm = $dbh->prepare($sql);
$stm->execute();
$result = $stm->fetchAll(PDO::FETCH_ASSOC);
print_r($result);
Expected result:
----------------
$result should containt 3 rows from query.
Actual result:
--------------
First row is omitted. I already tried different methods (with or
without prepare, fetching single rows etc.). I didn't find a way to make
PDO return all rows from query including first one.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47845&edit=1
Thread (3 messages)