Here the plain SQL Query (embedded in the php script): select tmp1.today, tmp2.oneday, tmp2.onedayrating from (select count(url) as today from track_statistics where ifnull(lastplayed,0)>(unix_timestamp()-TIME_TO_SEC(CURTIME())) order by url) tmp1, (select count(url) as oneday, cast(avg(rating) as UNSIGNED) as onedayrating from track_statistics where ifnull(lastplayed,0)>(unix_timestamp()-86400) order by url, rating) tmp2;
-- Blu3IcE System: Ubuntu, SqueezeCenter-Version: 7.3 Player: Squeezebox v3 @ Bose LifeStyle Series III Plugins: TrackStat, SugarCube, Dynamic Playlists, AutoDim ------------------------------------------------------------------------ Blu3IcE's Profile: http://forums.slimdevices.com/member.php?userid=13792 View this thread: http://forums.slimdevices.com/showthread.php?t=61105 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
