I have an old SQL playlist (below) which used to work OK but now fails
on the 'tracks.playCount is null' part. What do I need to change to get
this working again? (it's supposed to play songs that have never been
played between two years!)

-- PlaylistName: Not played by Years...
-- PlaylistGroups: Not played,Years
-- PlaylistParameter1:year:Select 1st year:
-- PlaylistParameter2:custom:Select 2nd year:select
tracks.year,tracks.year from tracks where
tracks.year>='PlaylistParameter1' and tracks.audio=1 group by
tracks.year order by tracks.year
select tracks.url from tracks
        left join track_statistics t1 on
                tracks.url=t1.url
        left join track_statistics t2 on
                tracks.url=t2.url and t2.rating>0
        left join dynamicplaylist_history on
                tracks.id=dynamicplaylist_history.id
        where
                tracks.audio=1
                and t2.url is null
                and tracks.playCount is null
                and tracks.year>='PlaylistParameter1'
                and tracks.year<='PlaylistParameter2'
        group by tracks.id
        order by rand()
        limit 10;


-- 
MillmoorRon
------------------------------------------------------------------------
MillmoorRon's Profile: http://forums.slimdevices.com/member.php?userid=6413
View this thread: http://forums.slimdevices.com/showthread.php?t=53604

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to