diff options
Diffstat (limited to 'lib/class/stats.class.php')
-rw-r--r-- | lib/class/stats.class.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/class/stats.class.php b/lib/class/stats.class.php index 9f5cfdae..b57bb56e 100644 --- a/lib/class/stats.class.php +++ b/lib/class/stats.class.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2007 Ampache.org + Copyright (c) Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -227,11 +227,12 @@ class Stats { $sql = "SELECT DISTINCT($type) FROM `song` ORDER BY `addition_time` DESC " . "LIMIT $limit"; - $db_results = Dba::query($sql); + $db_results = Dba::read($sql); + + $items = array(); - while ($r = Dba::fetch_row($db_results)) { - $object = new $object_name($r['0']); - $items[] = $object; + while ($row = Dba::fetch_row($db_results)) { + $items[] = $row['0']; } // end while results return $items; |