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 av.ID_ANALISE = ana.ID AND av.ID_PARAMETRO = pa.ID AND ana.DATA_COLETA <= '-' at line 1 | #0 /home/sigwm/public_html/ws/classes/dao/DAO.class.php(105): mysqli_query(Object(mysqli), ' SELECT av.ID_P...') #1 /home/sigwm/public_html/ws/classes/dao/laudos/AnaliseValorDAO.class.php(631): DAO->getRows(' SELECT av.ID_P...') #2 /home/sigwm/public_html/ws/classes/dao/laudos/AnaliseDAO.class.php(1401): AnaliseValorDAO->listRyznarByIdCliente(NULL, NULL, 6) #3 /home/sigwm/public_html/ws/webservice/laudos/reports/generate_graph_ryznar.php(22): AnaliseDAO->reportRyznarByClientAndIdLaudo(NULL, NULL, 6) #4 {main}