table one has a field titled friends which holds the member's id and a list of the member's friend's id #'s in csv format (i.e. 1,4,5,7,.
table two has info about all members (such as id, nickname, photo, etc).
I'm trying to access the friend list of a particular member (table 1) and then access those friend's info.
Here's what I have but I'm getting an error:
$friend_list = mysql_query("SELECT `friends_id` FROM `friends` WHERE `user_id`=".$_SESSION['userid']." LIMIT 1");
$friend_list = mysql_query("SELECT `user_id`,`hs`,`photo`,`photo_status`,`username` FROM `users` WHERE `user_id` IN (".substr($friend_list,0,-1).")") or die(mysql_error());
(friends_id will be the user_id of a member)
Please tell me if I'm not making sense....