From e3db356ad5ce7bf56ca4db88f564a57b69b4ca67 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 1 Mar 2006 08:47:17 +0000 Subject: - Patch #51850 by webchick: work around a db_rewrite_sql() bug. --- modules/statistics/statistics.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/statistics/statistics.module') diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index cb5024984..ed6c28d17 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -375,7 +375,7 @@ function statistics_cron() { * or FALSE if the query could not be executed correctly. */ function statistics_title_list($dbfield, $dbrows) { - return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node_counter} s INNER JOIN {node} n ON s.nid = n.nid INNER JOIN {users} u ON n.uid = u.uid WHERE %s <> '0' AND n.status = 1 ORDER BY %s DESC"), 's.'. $dbfield, 's.'. $dbfield, 0, $dbrows); + return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE %s <> '0' AND n.status = 1 ORDER BY %s DESC"), 's.'. $dbfield, 's.'. $dbfield, 0, $dbrows); } -- cgit v1.2.3