SQL Database for related family members

arowana

New Member
I am curious what you think is the best way to get this MySQL database to work.i had this table:\[code\]family.idfamily.namefamily.related\[/code\]And thought it wouldnt be a problem to connect related family members together in 1 query like this:\[code\]id | name | related1 | Name1 | 2 | Name2 | 3,53 | Name3 | 4 | Name4 | 5 | Name5 | 4,16 | Name6 | 7 | Name7 | 8 | Name8 | 69 | Name9 | 7\[/code\]So Name2 is related to Name3 and Name5, where Name5 have other related id's, so i should make a query to get the following id's:Selecting id 2, outputs related id's: 3,5,4,1Selecting id 6, outputs related id's: 8Selecting id 9, outputs related id's: 7But i cant find a query to get all the related id's in one column.Is it even possible?
 
Back
Top