Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT Images.id,Images.name,filesize,Albums.relativePath FROM Images JOIN Albums ON (Albums.id = Images.album) WHERE Images.id NOT IN (SELECT imageid FROM ImageTags) AND Images.album IS NOT NULL AND Images.status = 1 AND (Images.fileSize IN (SELECT DISTINCT fileSize FROM ImageTags JOIN Images ON (ImageTags.imageid = Images.id) WHERE Images.album IS NULL) AND name IN (SELECT DISTINCT Images.name FROM ImageTags JOIN Images ON (ImageTags.imageid = Images.id) WHERE Images.album IS NULL));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement