I have three tables.
table1:
|-------|-----------|
| Name | Studyarea |
|------|-----------|
| Joe | 1 |
| Joe | 2 |
| Chris | 1 |
| Mike | 3 |
|-------|----------|
table2:
|-----------|-----------|
| Studyarea | CourseID |
|-----------|-----------|
| 1 | 1,2 |
| 2 | 2 |
| 3 | 2,3 |
|-----------|-----------|
table3:
|-----------|-------------|
| CourseID | Course Name |
|-----------|-------------|
| 1 | Hardware |
| 2 | Programming |
| 3 | Networking |
|-----------|-------------|
I am kind of confused how I can write statement in Mysql to list each student name with the course name, like:
Joe--Hardware
Joe--Programming
Chris--Hardware
Mike--Networking
In table2, the courseID is in format of contactnated string.
Need help, thanks in advance.