Stats: fixed missing $q in $db->fetchrow()
authorDan
Fri, 29 May 2009 16:38:14 -0400
changeset 1012 d966be8d79a3
parent 1011 96119a79cf81
child 1013 8626bb38410f
Stats: fixed missing $q in $db->fetchrow()
includes/stats.php
--- 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(