Budgie Breeders in
SELECT b.*, t.nameTown, c.nameCounty, t.sefTown, c.sefCounty from budgie_breeders b
join towns t on b.idTown = t.idTown
join counties c on t.idCounty = c.idCounty
where
b.idBusinessType = 1 and b.idTown = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5