picture database question

L

ljb

Here is an article about an image database,
http://www.15seconds.com/issue/050915.htm, that leaves me asking another
question. Is there a SQL way I could query for multiple keywords with an AND
operation? The article basically uses a query that returns records that have
keywords IN a list and then filters that further in code. I came up with the
following in Access but it isn't flexible. How do I dynamically grow the
from and where sections?

SELECT path, title
FROM image,
imagekeyword AS ik1,
keyword AS k1,

imagekeyword AS ik2,
keyword AS k2

WHERE ik1.imageid=image.id
AND ik1.keywordid=k1.id
AND k1.keyword=[enter filter 1 of 2]

AND ik2.imageid=image.id
AND ik2.keywordid=k2.id
AND k2.keyword=[enter filter 2 of 2]


thanks
LJB
 
Top