Hi
I have two tables
questions
answers
One question can have many answers
i want to select all the questions with all answers
i also want to select the questions which are not answered yet.
thank you
select query issue
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: select query issue
Code: Select all
SELECT * FROM `questions`
LEFT JOIN `answers` ON `quesions`.`id` = `answers`.`question_id`- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: select query issue
This link offers a rather straightforward approach to JOIN queries: http://w3schools.com/sql/sql_join.asp