error 1064: 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 'AND gepubliceerd=1' at line 4 (select count(*) as count from huis LEFT JOIN country ON country.ID=huis.ID_country LEFT JOIN region ON region.ID=huis.ID_region WHERE huis.ID_country= AND gepubliceerd=1 )