on 10/18/02 1:03 PM, NIPP, SCOTT V (SBCSI) at [EMAIL PROTECTED] appended the
following bits to my mbox:

> Yeah, this is the exact fix I am trying to avoid.  Thanks for the
> feedback, but I prefer to keep the items chronological ascending order.  I
> know there has to be a way to simply default the display to the last page of
> the dataset.

I can think of a few other ways, none perfect:

1) Perform the same query as now, then use mysql_data_seek to start at 10
rows from the end.  Something like:

mysql_data_seek($result, mysql_num_rows($result) - 10);

The next 10 calls to mysql_fetch_* will give you the rows you want. (for
$I=0; $I < 10; $I++) The next page you do the same with 20, etc.

2) Similar thing, but first get the number of rows for the query, either the
same one or a SELECT COUNT(*) query, then use MySQL limit to limit to the 10
rows from the end.

3) Change to DESC as suggested by someone else, but instead of directly
outputting the result, store it into another array.  Then reverse that array
in php and display it.



Paul Burney

    while ($self != "asleep") {

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to