I got this little code:
$querym = mysql_query("SELECT count(*), videoid
FROM daystat_movies WHERE date >= now() - INTERVAL 1 DAY GROUP by videoid DESC");
while ($qshow = mysql_fetch_array($querym)) {
$videoid[1] = $qshow[videoid];
$date[1] = $qshow[date];
$queryc = mysql_query("SELECT * FROM daystat_movies WHERE date >= now() - INTERVAL 1 DAY AND videoid='$videoid[1]'");
$views[1] = mysql_num_rows($queryc);
echo "<tr><td>$videoid[1]</td> <td> $views[1] </td></tr>";
}
What gives me this outcome:
Most Viewed Videos (Last 24 Hours) Views
98 3
100 4
What I want now is to have the video id with the most views (in this case 100 with 4 views) to show on top of the list.