I want to diplay 2 lines of data on my site One has an 'id' (field in table name of: 'Gamepage') of 'test1' with another field called 'date' of 11-20-2009, and another has an 'id' of 'test2' with 'date' of 11-25-2009, Can you make the page display them in order of newest/oldest? Any help would be greatly appreicated...
Could you please show me a coded example? -Doesn't appear to work for mine. (But i could be putting it in wrong)
for example Gamepage table has 2 columns id and date. values are as below: id date 1 2009-08-24 2 2009-04-16 3 2009-10-22 the query "select id, date from Gamepage order by date desc" will output it as.. id date 1 2009-10-22 2 2009-08-24 3 2009-04-16
Ok, so i've got it like this, but it doesn't appear to be working... $query = ("SELECT * FROM Gamepage ORDER BY releasetime ASC") or die (mysql_error()); $result= mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['id'] . ' - Released on: ' . $row['releasedate']; echo "<BR>"; } could you please guide me/show me to what i need to do to get it working?
I know, but I realised i needed it ASC (ascending) So that bit is correct, Can you verify/fix the rest so it will display the 2 records correctly? -in ascending order. *Edit: Fixed
well, i believe its giving problem because of releasedate & releasetime unless they both are different fields. If they are different fields, then provide us with table structure so that we can help more..