Re: about resultset internal pointer

From: Date: Fri, 15 Aug 2003 03:16:11 +0000
Subject: Re: about resultset internal pointer
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-29905@lists.php.net to get a copy of this message
In article <20030811093307.75301.qmail@pb1.pair.com>, pengch@bizsmooth.com says... > in php,mysql_seek can move the pointer, but you have no way to know where > the pointer locates currently. > i think some function should be added in the future version, like > mysql_getPointerPosition($rs) which returns a int as the position in > resultset. so it's would be easy to implements some pointer moving functions > like mysql_movenext(), mysql_moveprev,mysql_movefirst,mysql_movelast etc. It's trivial to do your own tracking of where the pointer is, using mysql_num_rows to determine the number of rows in your result set and a counter to track your movement, using mysql_data_seek, in the result set. The manual shows n example of how to return a set in reverse order, for example. -- Quod subigo farinam $email =~ s/oz$/au/o; A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet?

« previous php.db (#29905) next »