Re: List of files with a specific tag
Posted by
mmjoshi on
Apr 13, 2021; 12:24pm
URL: http://digikam.185.s1.nabble.com/digiKam-users-List-of-files-with-a-specific-tag-tp4715803p4715903.html
Randy Wolf wrote
> The three tables at play are: Tags, Images, and ImageTags
>
> You can use a select to lookup the id in Tags:
> select * from tags;
>
> Then another select to get a list of files with that tagid:
> select images.name from images, imagetags where imagetags.tagid=100 and
> images.id=imagetags.imageid;
Hi Randy
This worked perfectly. Thanks for the tip. However, I realized that I need
to exclude certain tags from the query. I tried hard to figure out how to do
this but with my limited (very!) knowledge of SQL couldn't figure out.
The scenario is like this. i would like to output a list of all files with a
specific tag say Tag1 but also exclude all files with another tag say Tag2.
Is this possible? If yes what query should I use?
--
Sent from:
http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html