If I have 3 tables:
posts
post_id
title
body
tags
tag_id
name
posts_tags
post_id
tag_id
What is the best way to list (select) the posts and the tags for each of them from a single query?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simply join the three tables. If you use left join, you will also see which posts don’t have tags.