i need help in sql query
i have table named — threads
contain
post_id / post_title …..
and i have categories table named
thread_categories
contain
cate_id / post_id
file.php?cate_id=20
i want get all posts in category id = 20
Thank you
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.
I think it’s better to store your categories which is related to threads in a separate table.
Otherwise your query will very slow and inefficient.
You can use current table structure and try to use the following query but I don’t like it:
New query: