erland;166036 Wrote: 
> It works in my setup, how does the complete SQL look like ?

Like So:

select tracks.url from tracks
        join track_statistics on
                tracks.url=track_statistics.url
        left join dynamicplaylist_history on
                tracks.id=dynamicplaylist_history.id
        where
                audio=1
                and dynamicplaylist_history.id is null
                and tracks.secs>60
                and track_statistics.rating>=50
                or track_statistics.rating is null
                and not exists (select * from tracks t2,genre_track,genres
                                                where
                                                        t2.id=tracks.id and
                                                        
tracks.id=genre_track.track and 
                                                        
genre_track.genre=genres.id and
                                                        genres.name in 
('Christmas','Musical','Spoken Word'))
        group by tracks.id
        order by rand()
        limit 10;


-- 
Yannzola
------------------------------------------------------------------------
Yannzola's Profile: http://forums.slimdevices.com/member.php?userid=874
View this thread: http://forums.slimdevices.com/showthread.php?t=20533

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to