JonnySnip3r Posted August 23, 2010 Share Posted August 23, 2010 Hey guys i have been making a website where friends can post on each others profiles like facebookish anyways im not sure if this is th ebest way to do it but i have this below its part of the code that pulls all the friends of the member from the database:: $query_friend = mysql_query("SELECT my_id,friend_id FROM site_friends WHERE my_id='$my_id'"); while($row = mysql_fetch_assoc($query_friend)){ $friend_id = $row['friend_id']; } then i pass it into a function blah blah not got that for yet anyway what happens if this person ends up having 100s of friends will this be harsh on the servers memory? or should i not worry to much ? hope someone can help thanks!! Quote Link to comment Share on other sites More sharing options...
schilly Posted August 23, 2010 Share Posted August 23, 2010 I wouldn't worry about 100 rows. That's nothing. Just put an index on my_id and you should be good. Quote Link to comment Share on other sites More sharing options...
JonnySnip3r Posted August 23, 2010 Author Share Posted August 23, 2010 Cheers dude!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.