php join tables help

Looking for a little help if possible.

I am trying to join two table together but I keep getting an error: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in: while($result=mysqli_fetch_array($query,MYSQLI_ASSOC)).

The code without the JOIN statement works fine but as soon as I add it the above error appears.

here is my code

$sql = "SELECT * FROM table1 
INNER JOIN table2 ON (table1.member_id = table2.id)
WHERE MATCH (name,location) AGAINST ('%".$strKeyword."%' IN BOOLEAN MODE)";

As I’m still learning php Is this the right approach?

many thanks

Sponsor our Newsletter | Privacy Policy | Terms of Service