Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.3

Bug #811 Change to DB 1.6.0 Breaks Informix BC
Submitted: 2004-02-20 14:47 UTC
From: jkaufman at wamnetgov dot com Assigned: danielc
Status: Bogus Package: DB
PHP Version: 4.3.4 OS: Linux, Mandrake 9.1
Roadmaps: (Not assigned)    
Subscription  


 [2004-02-20 14:47 UTC] jkaufman at wamnetgov dot com
Description: ------------ fetchRow for Informix starts at 1, rather than the expected 0. Code has been written that anticpates this behaviour, and adjusts for it. The latest version of DB (1.6.0) corrects for this behaviour and breaks backward compatibility with existing programs. Reproduce code: --------------- /* MySQL fetches rows beginning from 0, Informix starts at 1 */ if ($dbengine=='ifx') { $iRowOffset++; } if ($iRowTotal) { $res = $dbh->limitQuery($sql, $iRowOffset, $iRowLimit); } $row = $res->fetchRow(DB_FETCHMODE_ASSOC, $iRowOffset); Expected result: ---------------- Without the adjustment to the row offset, then the first two rows that are retrieved are the same. With the adjustment, the correct rows are returned.

Comments

 [2004-02-20 14:59 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-02-20 15:11 UTC] jkaufman at wamnetgov dot com
My scripts currently compensate for the older behaviour and will break if I update to the latest DB. I can change my scripts, but I would have a different problem if the script ran on an older version of DB. Since I can't always control the DB version on all production systems, I need a way to determine the version and handle it that way (preferred), OR have an option to maintain backward compatibility as Lukas suggested.
 [2004-02-20 15:26 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!