Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: open
//$selfid is user id from session
$result=mysql_query("SELECT whom FROM friends WHERE who='$selfid'");
$result2=mysql_query("SELECT companyid FROM employees WHERE userid='$row[whom]'");
$result3=mysql_query("SELECT companyname, companylogo, url FROM companies WHERE companyid='$row2[companyid]'");
However could anybody brief me about how inner joins work?
also it is my understanding (and i'm happy to be corrected) that MySQL does not process subqueries very efficiently - unlike sqlserver which is very efficient - after all as far as i know subqueries were only introduced from version MySQL 4.1