Error while selecting 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 ')) t LEFT JOIN mfo m ON m.mfo_regnum=t.mfo_regnum' at line 1