Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Adding a tagging feature to blog
01-02-2012, 06:45 PM #1
- Join Date
- Jan 2012
- United States
- Thanked 0 Times in 0 Posts
Adding a tagging feature to blog
I've been trying to figure out how to implement a simple tagging feature to my blog script, but for the life of me, I can not figure it out!
I understand how to actually add the tags to the database and each entry, but not how to retrieve them.
For now, all I've formulated is this:
- Create a table called blog_tags add a tag_id field, tag_blog_id field and tag_name field.
- The tag_blog_id field will hold a blog ID - each tag a blog is given will have one entry in blog_tags: so, if an entry has 3 tags, it will have 3 entries in the blog_tags table
- Get a list of matching blog entries using a JOIN statement, joining blog_entries table and blog_tags table
So, to make a long story short, I need help with the JOIN statement...any suggestions?
Sorry if this post is a bit confusing, I've tried to explain it the best that I could
Last edited by createdigital; 01-02-2012 at 06:52 PM. Reason: Resolved