mysql - Select and join in same query from same table -
i try develop mafia game. store users in table, each user able set testament. problem is: x has id1 , y has id2 sets x testament (this store id1).
when x accesses status page should see stuff + testament (y).
i'm newbie when occur mysql stuff, can explain me how this? in future need add more selects query, if me doing awesome :)
you aliases
e.g
select m.name mum, c.name child people m inner join people c on c.mumid = m.id
would pickout
mum child irene tony
from
people id name mumid 1 irene null 2 tony 1
Comments
Post a Comment