jeeva Posted December 10, 2008 Share Posted December 10, 2008 Dear frnds I have table like +--------+---------+ | fromid | toid | +--------+---------+ | jeeva | ajith | | jeeva | senthil | +--------+---------+ From this table i have to get mutual friend by giving two id. For Example Senthil is viewing ajith's record. Here i have to get mutual friends for ajith and senthil. here jeeva is mutual friend for both..How can i get that record 'jeeva'. Note: I am not in the position to use join query because if i have more records then join query would be very slow. Please help me out.... Thanks Jeeva Link to comment https://forums.phpfreaks.com/topic/136318-get-mutual-records/ Share on other sites More sharing options...
fenway Posted December 11, 2008 Share Posted December 11, 2008 Note: I am not in the position to use join query because if i have more records then join query would be very slow. Says who? Link to comment https://forums.phpfreaks.com/topic/136318-get-mutual-records/#findComment-712597 Share on other sites More sharing options...
Mchl Posted December 11, 2008 Share Posted December 11, 2008 Note: I am not in the position to use join query because if i have more records then join query would be very slow. If that's the case, then don't use SELECT at all. It will also be slow when there are more records. Link to comment https://forums.phpfreaks.com/topic/136318-get-mutual-records/#findComment-712599 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.