Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001072

RE: [PHP] Need some help with this idea! From: Don Read (dread <email protected>)
Date: 07/24/01

On 24-Jul-2001 Chris Cocuzzo wrote:
> hey-
>
> I want to select the oldest show from a database to display on my main page,
> since the oldest show is also the show happening closest to any current
> time(if that makes sense...). I included a timestamp field in my table of
> shows in anticipation of checking that to find out what was the oldest.
> however, I'm wondering how I should go about doing that exactly. my idea was
> the scan through just that column of timestamps, find the lowest one, and
> then make a selection from the db based on the timestamp. Can any give me
> some examples of code to scan through a column like i mentioned, or give me
> better ideas on how to do this??
>
> thanks
> chris
>

'Old'-est - order by your_timestamp asc
'New'-est - order by your_timestamp desc

   ... limit x;

Regards,

-- 
Don Read                                       dread <email protected>
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>