Re: Log Application Formatting Issue...
| From: | Jason Wong | Date: | Fri, 18 Oct 2002 16:58:16 +0000 |
| Subject: | Re: Log Application Formatting Issue... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22502@lists.php.net to get a copy of this message | ||
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??
*/