[eluser]TheFuzzy0ne[/eluser]
I'd just like to point out that the design of the join table may be flawed. It only appears to work one way. For example, user 1 may be friends with users 3 and 4, but it doesn't look like they are friends with him. Is that right? I'd be quite concerned if any of my friendships were like that.
Basically, you'd probably have to run 2 queries, one to query the left-hand column, on for the right, and then you'd need to filter out any duplicate entries. Otherwise you'd need to add two rows for each user. For example, if you wanted to make user 2 and user 4 friends, you'd add (user 2, user 4), and the reverse (user 4, user 2).
EDIT: Sorry for repeating darkhouse. I had no idea he'd already suggested the idea.