ID: 47845
Updated by: [email protected]
Reported By: piotrt at itisit dot pl
-Status: Open
+Status: Verified
Bug Type: PDO related
Operating System: Windows XP
PHP Version: 5.2.9
New Comment:
I can reproduce it. This just was fixed in 5.3+ (bug #35386)
Previous Comments:
------------------------------------------------------------------------
[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