I am having trouble retrieving data from 2 tables, I have the following
$sql = mysql_query("SELECT * FROM table1 WHERE table1.cell = '$value' JOIN SELECT * FROM table2 WHERE table2.cell = '$value'", $db_con);
I have also tried
$sql = mysql_query("SELECT * FROM table1 WHERE table1.cell = '$value' UNION SELECT * FROM table2 WHERE table2.cell = '$value'", $db_con);
but i am not getting any results.
When i try
$sql = mysql_query("SELECT * FROM table1 WHERE table1.cell = '$value'", $db_con);
and
$sql = mysql_query("SELECT * FROM table2 WHERE table2.cell = '$value'", $db_con);
and i get the results from each table.
Can someone tell me where I have gone wrong :evil: