How to compare all dates in a specific field of a table....?
Posted: Sat Jun 23, 2007 5:39 am
So here's the deal...
I'm not an expert at PHP/MySQL, and just build websites for a hobby. Currently I'm building a news display on my front page, from which all details for each news entry will come from a MySQL database with the following fields:
newsid, newsdate, newstitle, newstext
14, 2007-06-23, Under Construction!, As you can see, the site is still under constructi...
that record is just one example to clarify...
Now, on my front page I need the most recent 3 articles to be displayed, whilst all the others can be found on a separate page (news archives)...
What coding can I use to compare all the dates from the table, and find which three articles are the most recent, in order to display only those on the front page?
All help is appreciated,
Thanks
I'm not an expert at PHP/MySQL, and just build websites for a hobby. Currently I'm building a news display on my front page, from which all details for each news entry will come from a MySQL database with the following fields:
newsid, newsdate, newstitle, newstext
14, 2007-06-23, Under Construction!, As you can see, the site is still under constructi...
that record is just one example to clarify...
Now, on my front page I need the most recent 3 articles to be displayed, whilst all the others can be found on a separate page (news archives)...
What coding can I use to compare all the dates from the table, and find which three articles are the most recent, in order to display only those on the front page?
All help is appreciated,
Thanks