Re: Getting last row, moving backwards..
| From: | mlemos at acm dot org | Date: | Fri, 19 Jan 2001 17:27:11 +0000 |
| Subject: | Re: Getting last row, moving backwards.. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-5993@lists.php.net to get a copy of this message | ||
Hello Chad,
Chad Day wrote:
>
> I need some help selecting the last row in my database, and then moving
> backwards.. I can't just get mysql_num_rows and go back by 1, as some of the
> records are missing.. the ID field might have #'s like 1950, 1948, 1947,
> 1944, etc, and I don't want it to break by mistakingly trying to grab 1949.
> Can someone provide some help or a link to where in the manual what I'm
> doing might be explained? Been searching, no luck yet. Thanks!
You may want to try this "Query result table display class" that lets
you browse query results presenting them in a table with links to to the
Next, Previous, First, Last and other pages of results if they don't fit
in a single page.
http://phpclasses.UpperDesign.com/browse.html/package/130
Manuel Lemos