Changeset 1698 for trunk/lib/class/artist.class.php
- Timestamp:
- 08/26/08 09:02:11 (4 months ago)
- Files:
-
- 1 modified
-
trunk/lib/class/artist.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/class/artist.class.php
r1670 r1698 90 90 // If we need to also pull the extra information, this is normally only used when we are doing the human display 91 91 if ($extra) { 92 $sql = "SELECT `song`.`artist`, COUNT(`song`.`id`) AS `song_count`, COUNT( `song`.`album`) AS `album_count`, SUM(`song`.`time`) AS `time` FROM `song` " .92 $sql = "SELECT `song`.`artist`, COUNT(`song`.`id`) AS `song_count`, COUNT(DISTINCT `song`.`album`) AS `album_count`, SUM(`song`.`time`) AS `time` FROM `song` " . 93 93 "WHERE `song`.`artist` IN $idlist GROUP BY `song`.`artist`"; 94 94 $db_results = Dba::query($sql); … … 189 189 else { 190 190 $uid = Dba::escape($this->id); 191 $sql = "SELECT `song`.`artist`,COUNT(`song`.`id`) AS `song_count`, COUNT( `song`.`album`) AS `album_count`, SUM(`song`.`time`) AS `time` FROM `song` " .191 $sql = "SELECT `song`.`artist`,COUNT(`song`.`id`) AS `song_count`, COUNT(DISTINCT `song`.`album`) AS `album_count`, SUM(`song`.`time`) AS `time` FROM `song` " . 192 192 "WHERE `song`.`artist`='$uid' GROUP BY `song`.`artist`"; 193 193 $db_results = Dba::query($sql);
