Can anyone tell me what's wrong with this? ...
$sql_statement="SELECT tbl2.ID FROM tbl2 JOIN (tbl1 JOIN tbl3 ON tbl1.ID= tbl3.ID) ON tbl2.ID = tbl3.ID";
thx!
When you your mysql_query put or die(mysql_error()) at the end
Like this $sql = "......."; mysql_query($sql)or die(mysql_error());
then you will get an error message that will help you spot the problem
HTH
GM
I've founnd that mySQL does not like the syntax
JOIN (...some other join....) ON ....
Rearranging usually works
SELECT tbl2.ID FROM (tbl1 JOIN tbl3 ON tbl1.ID= tbl3.ID) JOIN tbl2 ON tbl2.ID = tbl3.ID
hth