I have 6 tables in the same database. I'd like to display all the data in these 6 tables and display it in the browser as a single table. So I used full inner join for this purpose. I tried the code below, but its throwing an error like "mysql_num_rows() expects parameter 1 to be resource, boolean".
$sql ="SELECT * FROM table1 INNER JOIN table2 ON table1.pk1=table2.fk2
INNER JOIN table3 ON table1.pk1=table3.fk3 INNER JOIN
table4 ON table1.pk1=table4.fk4 INNER JOIN table5 ON
table1.pk1=table5.fk5 INNER JOIN table6 ON table1.pk = table6.fk6";
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0) {
while($row = mysql_fetch_array($result)) { //display function
}
And is it possible to use full outer join in mysql.?