egd;227818 Wrote:
> Unrelated question: if I was to search for all _albums_ where any track
> in the album does not contain either a STYLE or MOOD or THEME tag, what
> would that look like in the construct of the tables you have added?
> I'm wanting to identify all scanned albums that have not been tagged
> using one or more of these tags so that I can retag them to include the
> tag info.
I think something like this should work:
Code:
--------------------
select albums.id,albums.title,tracks.url from albums
join tracks on
albums.id=tracks.album
left join customscan_track_attributes attr1 on
tracks.id=attr1.track and
attr1.module='customtag' and
attr1.attr='STYLE'
left join customscan_track_attributes attr2 on
tracks.id=attr2.track and
attr2.module='customtag' and
attr2.attr='MOOD'
left join customscan_track_attributes attr3 on
tracks.id=attr3.track and
attr3.module='customtag' and
attr3.attr='THEME'
group by albums.id
having min(attr1.track) is null or min(attr2.track) is null or
min(attr3.track) is null
order by albums.title
--------------------
--
erland
Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan, Custom Skip, Multi Library and Database Query plugins'
(http://wiki.erland.homeip.net/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=38256
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins