SQL Error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and a.district = b.cd_id and a.area = c.cd_id and a.category = d.cd_id and a....' at line 1