Alright everybody, need some help with joins in mysql. Here's a run down of what I have. The number in song1-5 of ylw_weeks table is the id from the yls_songs table
table 1: 'yls_weeks':
id | week | song1 | song2 | song3 | song4 | song 5
-------------------------------------------------------------------------
1 | 9-18-2006 | 1 | 2 | 3 | 4 | 5
-------------------------------------------------------------------------
2 | 9-11-2006 | 1 | 2 | 3 | 4 | 5
table 2 'yls_songs':
id | name | lyrics | audio
----------------------------------------------------------------
1 | song1Name | ~~~~~ | pathToAudioFile
----------------------------------------------------------------
2 | song2Name | ~~~~~ | pathToAudioFile
and so on...
what I need to get is the weeks.week, and for week.song1-5 I need to get the name and audio from the songs table while still having the id.
I'm pretty sure I'm suppose to use a type of join, but I'm having issues getting it right, please help.
table 1: 'yls_weeks':
id | week | song1 | song2 | song3 | song4 | song 5
-------------------------------------------------------------------------
1 | 9-18-2006 | 1 | 2 | 3 | 4 | 5
-------------------------------------------------------------------------
2 | 9-11-2006 | 1 | 2 | 3 | 4 | 5
table 2 'yls_songs':
id | name | lyrics | audio
----------------------------------------------------------------
1 | song1Name | ~~~~~ | pathToAudioFile
----------------------------------------------------------------
2 | song2Name | ~~~~~ | pathToAudioFile
and so on...
what I need to get is the weeks.week, and for week.song1-5 I need to get the name and audio from the songs table while still having the id.
I'm pretty sure I'm suppose to use a type of join, but I'm having issues getting it right, please help.
