Lautarox Posted November 1, 2010 Share Posted November 1, 2010 I'm building a facebook application, as it is intendeed to reach to a big ammount of users, I'm worried about the performance of it, I'm querying facebook to get user's friends and then I'm searching for each of them in a mysql database, what would you recommend me to do? Is it better to perfom separated querys looking for each user or should I make a query looking for all the users, something like, SELECT * FROM table WHERE id=id1 AND id=id2 ... Thanks in advance Link to comment https://forums.phpfreaks.com/topic/217449-searching-for-a-user-list-in-database/ Share on other sites More sharing options...
snowman15 Posted November 8, 2010 Share Posted November 8, 2010 I would gather all the ID's your looking for in an array, then use a loop to build an sql statement with lots of 'id=id1 OR' (then repeat) and do one single query. Link to comment https://forums.phpfreaks.com/topic/217449-searching-for-a-user-list-in-database/#findComment-1131968 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.