I'm using a 2 table tagging system for articles (myisam) and I'm trying to get related articles based on the tags and category_id of the article currently being viewed.
What would be the optimal query to achieve this? I only seem to be able to find answers for 3 table tag systems.
tags:
articles:Code:`article_id` int(11) NOT NULL DEFAULT '0', `tag` varchar(99) NOT NULL DEFAULT '', PRIMARY KEY (`article_id`,`tag`), KEY `tag_ix` (`tag`)
Thanks for any help.Code:`article_id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL DEFAULT '', `content` text NOT NULL, `category_id` int(11) NOT NULL, `tags` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`article_id`), KEY `category_id` (`category_id`)



Reply With Quote


Bookmarks