I've implemented an SO-style tagging system to my comics site.
Each comic can have 1 or many tags.
The way I have it set up currently is: There's a comics table, tags table, and a relational comictags table. The query will check if there is a matching comic id and tag id...
$sql =
"SELECT c.*, t.*
FROM comics c
INNER JOIN comictags ct ON (c.id = ct.comicID)
INNER JOIN tags t ON (t.tagid = ct.tagID)
WHERE ct.tagID IN ('" . implode(', ', $_SESSION['tagids']). "')
". $catquery ." " . $order;

The problem with this is it forces me to add a new entry to comictags table each time I want to add a new tag to a comic id.
Is it possible to have more of this schema:?
comicid_1: tagid_1, tagid_2, tagid_3, etc...
Meaning, I make 1 entry for each comic id, and add a comma separated tag id in the tagid field for each tag I want associated.
Thanks!
ComicsTags.id. Your primary key is(imgid,tagid), why add more unneeded data?idcolumn in yourComicsTagstable. What is it good for? It doesn't add anything.