and if you ~don't~ want to present users a list of tags from which they must choose, but, instead, want to let them use whatever tags they want, then you should not bother with a tags table at all, and just do this --
Code:
CREATE TABLE articlestags
( articleID INTEGER NOT NULL
, tag VARCHAR(200) COLLATE utf8_general_ci NOT NULL
, PRIMARY KEY ( articleID,tag )
, KEY ( tag,articleID )
);
by the way, where did INTEGER(150) come from? just curious, as you shouldn't really be using an auto_increment here anyway
Bookmarks