I'm having trouble returning more than one 'tag' from the 'catalog_tag' table when I perform a search query for a specific tag. If I do a search on 'catalog.catalog_id', I do get all the associated tags via the inner joins. Is there a way to grab the tags when searching for a specific tag?
Tables:
catalog table has: catalog_id|name|post_date
catalog_tag_relationship has: catalog_id|tag_id
catalog_tag has: tag_id|tag_name
SQL:
SELECT catalog_id, name, tag.tag_id, tag.tag_name
FROM catalog
INNER JOIN catalog_tag_relationship tagRel ON (tagRel.catalog_id=catalog.catalog_id)
INNER JOIN catalog_tag tag ON (tagRel.catalog_tag_id=tag.tag_id)
WHERE (tag.tag_name='dinosaurs')
(tagRel.catalog_id=catalog.catalog_id)? Okay, you changed your post, but did it fix anything when you tested it?tag_slug= 'dinosaurs'. The way your schema is set up, you should probably only have one tag with thattag_slugin the tag table, thought you might have multiple records incatalogassociated with it. Why do you expect to return more than one tag when you are only querying for one tag?