Fw: [PHP-DB] select and sort question

2002-04-27 Thread Richard Emery
Why don't you sort in your SELECT statement? SELECT * FROM newsitems where ID='1' ORDER BY newsdate DESC - Original Message - From: Kirk Babb <[EMAIL PROTECTED]> To: <> Sent: Saturday, April 27, 2002 3:56 PM Subject: [PHP-DB] select and sort question I have

Re: [PHP-DB] select and sort question

2002-04-27 Thread mike
There are many ways to sort by date. I use something like this SELECT * FROM newsitems WHERE newsdate=(whatever date you want); For selecting records for the current date I use php's date function to get the current date in the right format. $current_date = date("Ymd"); SELECT * FROM newsitems

[PHP-DB] select and sort question

2002-04-27 Thread Kirk Babb
I have a db table which holds news in the following manner: ID (auto-increment), newsdate (DATE), newstitle, and newstext I have been displaying them by ID, and would like instead to sort them by date (descending). Since I'm using Flash I have been doing mysql_fetch_array for each ID query and t