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 ATIVO=1 AND FINALIZADO=1 AND (IGNORAR_RELATORIO IS NULL OR IGNORAR_RELATORIO' at line 1 | #0 /home/sigwm/public_html/ws/classes/dao/DAO.class.php(105): mysqli_query(Object(mysqli), 'select ID_CLIEN...') #1 /home/sigwm/public_html/ws/classes/dao/laudos/AnaliseDAO.class.php(1630): DAO->getRows('select ID_CLIEN...') #2 /home/sigwm/public_html/ws/webservice/laudos/reports/generate_graph_cupom2.php(48): AnaliseDAO->reportCupomCobre(NULL, NULL, NULL, '--30') #3 {main}