Jump to content

join tables problem


janim

Recommended Posts

hi guys

i have trouble in joining tables together

lets say i have two tables : singers and songs .

********

singers table :

id  name

1  eminem

2  akon

3  shaggy

 

********

songs table:

id  song

1  smack that

2  sexy

3  lose your self

4  till i collapse

5  lonely

 

etc....

 

so how can i join those tables ????

every singer has a lot of songs and every song has a lot of singers too

let's take example here

 

smack that by eminem  and akon so i can't put another row in the songs table for the singer name

please help this is gonna kill me

 

 

Link to comment
https://forums.phpfreaks.com/topic/83173-join-tables-problem/
Share on other sites

As Revraz has said you need to add further details

 

singers table :

id  name

1  eminem

2  akon

3  shaggy

 

********

songs table:

id  song    name

1  smack that  eminem

2  smack that  akon

3  sexy

4  lose your self

5  till i collapse

6  lonely

 

 

select * from singers a, songs b

where name a = name b

 

etc....

Link to comment
https://forums.phpfreaks.com/topic/83173-join-tables-problem/#findComment-423099
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.