summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
authorpb1dft <pb1dft@ampache>2006-10-25 21:34:14 +0000
committerpb1dft <pb1dft@ampache>2006-10-25 21:34:14 +0000
commit86d02b0c7a4a64792b6edfbed5a1fbe270444907 (patch)
treefb56d887175184d17b1942f23e0ec9273d938748 /lib/class
parent320ee86b9514103c599c2b309df712a6cf1650dc (diff)
downloadampache-86d02b0c7a4a64792b6edfbed5a1fbe270444907.tar.gz
ampache-86d02b0c7a4a64792b6edfbed5a1fbe270444907.tar.bz2
ampache-86d02b0c7a4a64792b6edfbed5a1fbe270444907.zip
Fixed Stats for Mysql version 4 Left it like this for vollmer to test
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/stats.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/class/stats.class.php b/lib/class/stats.class.php
index ba97badf..745232b9 100644
--- a/lib/class/stats.class.php
+++ b/lib/class/stats.class.php
@@ -77,7 +77,7 @@ class Stats {
/* Select Top objects counting by # of rows */
$sql = "SELECT object_id,COUNT(id) AS `count` FROM object_count" .
" WHERE object_type='$type' AND date >= '$date'" .
- " GROUP BY object_id ORDER BY COUNT(object_id) DESC LIMIT $count";
+ " GROUP BY object_id ORDER BY `count` DESC LIMIT $count";
$db_results = mysql_query($sql, dbh());
$results = array();
@@ -112,7 +112,7 @@ class Stats {
/* Select Objects based on user */
$sql = "SELECT object_id,COUNT(id) AS `count` FROM object_count" .
" WHERE object_type='$type' AND date >= '$date' AND user = '$user'" .
- " GROUP BY object_id ORDER BY COUNT(object_id) DESC LIMIT $count";
+ " GROUP BY object_id ORDER BY `count` DESC LIMIT $count";
$db_results = mysql_query($sql, dbh());
$results = array();