PDO_Firebird omits first row from query
| Bug #47845 | PDO_Firebird omits first row from query | ||||
|---|---|---|---|---|---|
| Submitted: | 2009-03-31 08:03 UTC | Modified: | 2009-04-03 22:14 UTC | ||
| From: | piotrt at itisit dot pl | Assigned: | |||
| Status: | Closed | Package: | PDO related | ||
| PHP Version: | 5.2.9 | OS: | Windows XP | ||
| Private report: | No | CVE-ID: | None | ||
[2009-03-31 08:03 UTC] 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.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2009-04-03 22:14 UTC] felipe@php.net