I’m creating a custom tag system with php and mysql, using the Toxi mysql schema http://forge.mysql.com/wiki/TagSchema#Toxi (three tables, many to many realtionship).
I’ve seen a lot of examples how to retrieve most used tags, etc etc. ex.g
SELECT tag_text, COUNT(*) as num_items
FROM Item2Tag i2t
INNER JOIN Tags t ON i2t.tag_id = t.tag_id
GROUP BY tag_text;
But I need to retrieve all the tags in the system (instead of only the used ones), having the usage weight for each, and having the tags not used yet with a weight of zero.
try the following query, i will get all the tags in
Tagstable