includes/stats.php
changeset 1012 d966be8d79a3
parent 953 323c4cd1aa37
child 1081 745200a9cc2a
--- a/includes/stats.php	Fri May 29 16:37:32 2009 -0400
+++ b/includes/stats.php	Fri May 29 16:38:14 2009 -0400
@@ -63,7 +63,7 @@
   $data = array();
   $q = $db->sql_query('SELECT COUNT(hit_id) AS num_hits, page_id, namespace FROM '.table_prefix.'hits GROUP BY page_id, namespace ORDER BY num_hits DESC LIMIT ' . $num . ';');
   
-  while ( $row = $db->fetchrow() )
+  while ( $row = $db->fetchrow($q) )
   {
     $title = get_page_title_ns($row['page_id'], $row['namespace']);
     $data[] = array(