I recently installed the album ranking module and it's working well so far.
However,The album by plays listing seems not to give accurate results.I compared it to results from the database chart (group by song album(X-axis) and order by hifi_scount_total(Y-axis).They differ.
Besides albums by name(order 1),albums by plays(order 4) and albums by rating(order 7) all give the same results.What could be causing this?
The listing for albums by plays seem to be generated from this code in the albums.php
Code
/** database query **/
$req = "SELECT s.song_album, s.band_id, s.song_id, s.song_time, s.song_name, b.band_name, b.band_id, b.band_quota, g.genre_name
FROM {$jamroom_db['song_info']} s
LEFT JOIN {$jamroom_db['band_info']} b on s.band_id=b.band_id
LEFT JOIN {$jamroom_db['song_genre']} g on s.song_genre = g.genre_id
LEFT JOIN {$jamroom_db['quota']} q ON q.quota_id = b.band_quota
WHERE b.band_active = '1' {$add}
GROUP BY s.song_album ";
jmLogger (0, 'INF', $req);
// Check how we are ordering
switch ($_args['order']) {
case '1': $req .= "ORDER BY s.song_album ASC "; break;
case '2': $req .= "ORDER BY s.song_id ASC "; break;
case '3': $req .= "ORDER BY s.song_id DESC "; break;
case '4': $req .= "ORDER BY s.hifi_scount_total DESC"; break;
case '5': $req .= "ORDER BY s.hifi_scount_total ASC"; break;
case '6': $req .= "ORDER BY s.song_genre ASC "; break;
default:
$req .= "ORDER BY a.song_album ASC ";
break;
Any suggestions on fixing this?......Otherwise the module is great so far.