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