Sunday, 25 August 2013
friend in common query mysql
friend in common query mysql References I have these 2 tables: users and friendship. i would like find the friends in common between two user, i tried to do some query with alias but doesn\'t show my results. Table users user_id | name | surname 1 Luca Jhon 2 Paul Red 3 Jin Blue 4 Diana Lars Table friendship id_friendship | id_user_sender | id_user_receive | confirm 1 1 2 2 2 2 3 2 3 1 3 2 4 1 5 2 Should be show this one if i am the user called Luca (id 1 ) and search the realtion with Paul (id 2) name | surname | id_user | Jin Blue 3 Any idea? Thank you
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment