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

Request #1049 reset result row-pointer
Submitted: 2004-03-22 04:37 UTC
From: webmaster at learningmedia dot co dot nz Assigned:
Status: Wont fix Package: DB
PHP Version: 4.3.2 OS: Mac OS X (10.3)
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 - 48 = ?

 
 [2004-03-22 04:37 UTC] webmaster at learningmedia dot co dot nz
Description: ------------ I would like to request the addition of a method to the DB_Result class that would reset the result row-pointer. This would allow the reuse of a $DB_Result. Other people would seem to support this request: http://forums.devshed.com/archive/t-50614 [Other row-pointer manipulations (eg. next, prev., last, etc.) may also be helpful.] Regards James Robertson

Comments

 [2004-03-22 05:06 UTC] danielc
Not a bad idea. As an interim measure, one can accomplish this by setting the $rownum argument of either fetchRow() or fetchInto() to 0 and then continue looping.
 [2004-03-24 12:39 UTC] lsmith
this will of course only work for all rdbms that buffer result sets, since DB doesnt emulate buffering.
 [2005-09-20 16:21 UTC] php at adaniels dot nl
This also ins't a good enough solution, when you have a general purpose function looping a result. Fetching row zero before calling the function, will make it start with the second row. So I would still love to see a reset result pointer mehod. (Please reply if I havn't made myself clear)
 [2006-03-11 10:18 UTC] lsmith
DB is in maintenance mode, this feature is already implemented in MDB2 using the rowCount() method.