Jump to content
xisto Community
Sign in to follow this  

Narrowing Search Results

Recommended Posts

Hello everyone,I need help in querying an image library, in which I set up two tables: one that contains info about the image (called images) and one that associates each image with a keyword, called keywords (this is a one-to-many relationship - an image can have up to 7 keywords). The keywords table has these fields kID (primary #), ImageID (the same from the images table), and Keyword. So it looks like:kID GraphicID Keyword1 1 woman2 1 white3 1 frown4 2 man5 2 black6 2 smileWhat is the best way to query the images and keywords table so that it narrows down users' search? For instance, if users type in a form two search words (search_k1 and search_k2), I would want only those records that equal BOTH these keywords to show up (instead of records that equal search_k1 AND records that equal search_k2 -- which is what I am getting now). Thanks,

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.