equal
deleted
inserted
replaced
61 } |
61 } |
62 |
62 |
63 $data = array(); |
63 $data = array(); |
64 $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 . ';'); |
64 $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 . ';'); |
65 |
65 |
66 while ( $row = $db->fetchrow() ) |
66 while ( $row = $db->fetchrow($q) ) |
67 { |
67 { |
68 $title = get_page_title_ns($row['page_id'], $row['namespace']); |
68 $title = get_page_title_ns($row['page_id'], $row['namespace']); |
69 $data[] = array( |
69 $data[] = array( |
70 'page_urlname' => $paths->get_pathskey($row['page_id'], $row['namespace']), |
70 'page_urlname' => $paths->get_pathskey($row['page_id'], $row['namespace']), |
71 'page_title' => $title, |
71 'page_title' => $title, |