ERROR: Could not execute MySQL query. Query: 'SELECT * FROM PROJETOS, ORGAOS, SECOES s WHERE sec_codigo = 10 AND org_codigo = ORGAOS_org_codigo AND s.PROJETOS_proj_codigo = AND proj_codigo = '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 proj_codigo =' at line 6