Hello. in one of my Mysql databases called 'games' i have a collumn called "added". now i wonder how i can make my php page/code display 10 of the newest added games by date, and if it's more then 10 added at let's say (09:02:2007) it could just pick 10 at random to display from that date. the date is in "Monthate:Year" as also shown in the example above. if possible, how could they be displayed in a top 10 manners as bellow? 1: name1 2: name2 3: etc i hope someone can help me. thanks in advance.
you can add the 'order by date' and then 'limit 10' to it SELECT * FROM games WHERE id > 0 ORDER BY date LIMIT 10
You can do a 'FOR LOOP' on your results. e.g. <?for ($i=0;$i<$resultsCount;$i++){ $num = $i+1; echo $num.":".$results[$i]; <?}?>