Hello,
I'm experimenting with a tagging system which is a many-to-one relationship. My schema is:
items table:
- item_id
- comment
comment _ tags:
- item_id
- tag_id
tags table:
- tag_id
- tag_name
I've been reading of implementation designs at the links at the bottom but got stuck. I can insert tags without a problem.
How do I fetch every tag that has been used and get how many times it has been applied to an item in the comment _ tags table?
http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html
http://stackoverflow.com/questions/388687/sql-query-for-product-tag-relationship