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.ps_type = d.cd_id and a.gender = e.cd_id and a...' at line 1