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

Bug #756 limit queries not working in peardb using odbc
Submitted: 2004-02-14 02:14 UTC
From: gerry dot rodman at ness-usa dot com Assigned: danielc
Status: Bogus Package: DB
PHP Version: 5CVS-2004-02-13 (dev) OS: win 2003
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2004-02-14 20:07 UTC
Package:
Bug Type:
Summary:
From: gerry dot rodman at ness-usa dot com
New email:
PHP Version: Package Version: OS:

 

 [2004-02-14 02:14 UTC] gerry dot rodman at ness-usa dot com
Description: ------------ Running a limit query return all of the records in a table, not just the requested records. As of RC3 this code was working (only returning the request rows). Now the same limit query returns all of the rows. This bug happens using both MS Access (2003) and MS SQL. To reproduce: Create or use and existing mdb,system dsn, and data table. The table should have more then 5 records. Plug in repective values in included code and run. Reproduce code: --------------- <html> <body> <? require_once 'DB.php'; $user = ''; // leave blank unless mdb is secured $pass = ''; // leave blank unless mdb is secured $protocol = 'odbc'; // leave as is $db_name = 'YOUR_DSN_NAME'; // change to System DSN $dsn = $protocol . "://" . $user . ":" . $pass . "@" . $db_name; $db = DB::connect($dsn); if (DB::isError($db)) { die ($db->getDebugInfo()); } $sql = "select * from YOUR_TABLE"; // change to match your table $start = 3; $count = 2; $rs = $db->limitQuery($sql,$start,$count); while ($row = $rs->fetchRow(DB_FETCHMODE_OBJECT)) { echo $row->YOUR_FIELD . "<br>"; // change field name to match your table } ?> </body> </html> Expected result: ---------------- Should only see rows 3-4 Actual result: -------------- Will see all rows

Comments

 [2004-02-14 02:23 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-14 17:39 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-14 19:53 UTC] gerry dot rodman at ness-usa dot com
I did an upgrade to DB Pear. It is now working for me. I am a bit surprised that running go-pear.bat after installing the snapshot did not get the latest version of peardb however. (I would not have thought it necessary to run a pear upgrade db). Is this working as intended? In any case, thank you for your guidance. gr
 [2004-02-14 20:07 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!