Sorry, I didn't complete the last thought. First of all, I
don't know php so I'm not sure what the $row before the
table2.desiredcountry is for. If you are looking for an exact match
between the two tables, then you should not be using a LIKE
operator. Either join the tables in the Where clause using the =
operator, or put them in the join condition in the From clause.
But distinguishing same name columns by qualifying with the
table name is correct.