MySQL Joining three tables
- by text
I am doing a query with three tables, the problem was one table has many occurrences of id of another.
sample data:
users: id
answers:
id:1
user_answer :1
id:1
user_answer :2
id:1
user_answer :3
Questions:
id:1
answers :answer description
id:2
answers :answer description
id:3
answers :answer description
How can I get all user information and all answer and its description, I used GROUP by user.id but it only returns only one answer.
I want to return something like this list all of users answer:
Name Q1 Q2
USERNAME ans1,ans2 ans1,ans2 comma separated description of answer here