I want to move record next and previous record in PHP?
Does any function to make it?
In ASP, it use "movenext" ? any idea? Thanks your help.
How to move record in PHP?
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: How to move record in PHP?
With most of the PHP database libraries, fetching a record will move to the next record. Each fetch will retrieve the next record until you go past the last record in the result set.
(#10850)
Re: How to move record in PHP?
thx yr info.
then how can I move back to previous record?
Any ideas?
Thanks your help.
then how can I move back to previous record?
Any ideas?
Thanks your help.
Re: How to move record in PHP?
... Mee too I'm interested in this argument... Thanks.cnnabc wrote:thx yr info.
then how can I move back to previous record?
Any ideas?
Thanks your help.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: How to move record in PHP?
Again, the database libraries typically provide a function for this, such as pg_result_seek or mysql_data_seek(). The PHP Manual is a great source of answers to questions like this.
Also, with PHP web applications you don't usually "seek" but instead just read the records in and do whatever is needed. Seeking is much more common in long running applications where the file or database connection is kept open. A PHP request, on the other hand, only runs for a few seconds at most.
Also, with PHP web applications you don't usually "seek" but instead just read the records in and do whatever is needed. Seeking is much more common in long running applications where the file or database connection is kept open. A PHP request, on the other hand, only runs for a few seconds at most.
(#10850)