I am writing a small news script for a site of mine that has a few games I have created.
I have figured out how to make it so it only displays news from the database if it is greater than the minimum date (basically today - 7), but I am having trouble ordering the news so that the newest news items appear on the top, rather than the bottom.
New news items have a higher ID, and they also have a higher date...the two principle ways of ordering news are therefore eliminated, because the ORDER BY command makes the lower numbers appear on the top (i.e. news with ID 1, which would be the first news item posted, will appear above news with ID 7...which doesn't make any sense because ID 7 would mean it was obviously posted after ID 1, and therefore should be above it.)
Here is where I am using it: http://www.niaad.com/nsprod/index.php
I am asking if there is anyway to make the ORDER BY command opposite, and or any other possible solutions.
Thanks in advance .
I have figured out how to make it so it only displays news from the database if it is greater than the minimum date (basically today - 7), but I am having trouble ordering the news so that the newest news items appear on the top, rather than the bottom.
New news items have a higher ID, and they also have a higher date...the two principle ways of ordering news are therefore eliminated, because the ORDER BY command makes the lower numbers appear on the top (i.e. news with ID 1, which would be the first news item posted, will appear above news with ID 7...which doesn't make any sense because ID 7 would mean it was obviously posted after ID 1, and therefore should be above it.)
Here is where I am using it: http://www.niaad.com/nsprod/index.php
I am asking if there is anyway to make the ORDER BY command opposite, and or any other possible solutions.
Thanks in advance .