I would like to join two tables and only print records from table 1 where the rec_number is NOT in table 2.
table 1
name rec_number
john smith 123
Bob jonson 345
etc
Table 2
Bob jonson 345
etc
What is the query in php that would do this so the query only gives me John smith, not bob jonson. is it:
$query = "select * from table1
left join rec_number on table1.rec_number = table2.rec_number";
$result=mysql_query($query);
Thank you.