View Single Post
Old 02-26-2009, 06:32 PM   #13 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

I'm not sure, but I would probably just do a table in db like:

friendships
fs_id
fs_user1
fs_user2
fs_type(like on vB you can have "contact" or "friend")

so when fetching someone's friendslist:
Code:
"SELECT * FROM `friendships` where `fs_user1` = '".$userid."' OR `fs_user2` = '".$userid."'";
__________________
Tanax is offline  
Reply With Quote