|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-03 10:56 UTC] felipe@php.net
[2009-04-03 22:14 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 00:00:02 2025 UTC |
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.