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!! Link to comment https://forums.phpfreaks.com/topic/211520-php-memory-concern-please-help/ 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. Link to comment https://forums.phpfreaks.com/topic/211520-php-memory-concern-please-help/#findComment-1102765 Share on other sites More sharing options...
JonnySnip3r Posted August 23, 2010 Author Share Posted August 23, 2010 Cheers dude!! Link to comment https://forums.phpfreaks.com/topic/211520-php-memory-concern-please-help/#findComment-1102773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.