SELECT file_id FROM img_link l, img_tags t WHERE t.id=l.tags_id AND t.tag = '%s' This fetches all file_id's with a tag associated of '%s' How do I fetch all file_id's that are associated with more than one tag I keep wanting to do AND t.tag = '%s' AND t.tag = '%s' but I know thats wrong. Halp?