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.

-----Original Message-----
From: Jason Wong [mailto:phplist@;]
Sent: Friday, October 18, 2002 11:58 AM
Subject: Re: [PHP-DB] Log Application Formatting Issue...

On Saturday 19 October 2002 00:09, NIPP, SCOTT V (SBCSI) wrote:
> I am trying to tweak an application that I have developed.  The
> application is our "On-Call Log".  This application consists of three
> pages; one page to input new entries, one page to edit existing entries,
> and finally a log view page.  The log view page displays all entries for
> the past 5 days.  The display of the entries is formatted properly, and
> presented chronologically with the oldest first with 10 items per page.
> This is exactly what I want.  The one thing that I want to change is that
> the log defaults to displaying the "first" page containing the oldest
> items. I would like the log to display exactly as it does, but default to
> displaying the last page first.  This way we see the most recent items
> first.
>       I hope this makes sense, and following is what I think are the
> relevant sections of the code:

One quick fix is to just display the items in reverse order so the newest 
items are always first ...

> { some code snipped }
> mysql_select_db($database, $Prod);
> $query_entry = "SELECT * FROM oncall WHERE TO_DAYS(NOW()) - TO_DAYS(ptime)
> <=5 ORDER BY 'ptime' ASC";

... change the ASC to DESC should do the trick.

Jason Wong -> Gremlins Associates ->
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

Yow!  Did something bad happen or am I in a drive-in movie??

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to