MySQL How to select friends from a friendship table?

Posted by Thomas Puthoor on Stack Overflow See other posts from Stack Overflow or by Thomas Puthoor
Published on 2010-04-21T04:37:24Z Indexed on 2010/04/21 4:43 UTC
Read the original article Hit count: 192

Filed under:
|

Hi I have a simple database for storing friendship, with just two columns person_a, person_b , denoting that person_a and person_b are friends. From a big list like this what query should I run to get say get all friends of 'sam'. Thank you.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about database