RE: [PHP-DB] Log Application Formatting Issue...
| From: | SBCSI) | Date: | Fri, 18 Oct 2002 17:03:08 +0000 |
| Subject: | RE: [PHP-DB] Log Application Formatting Issue... | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22503@lists.php.net to get a copy of this message | ||
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@gremlins.com.hk]
Sent: Friday, October 18, 2002 11:58 AM
To: php-db@lists.php.net
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 -> www.gremlins.com.hk
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 (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php