Fatal error: Falha no SQL: SELECT SQL_CALC_FOUND_ROWS o.date, o.id_order, s.status as status, s.color_site, (CASE WHEN payment_method = 'À Prazo' THEN price_products_forward ELSE price_products END) AS price, c.name FROM rp_orders o LEFT JOIN rp_orders_clients c ON c.id_order = o.id_order LEFT JOIN rp_orders_status s ON s.id_status = o.id_status WHERE o.id_client = ORDER BY o.date desc, o.id_order asc LIMIT 0,12 Erro: 1064 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 'ORDER BY o.date desc, o.id_order asc LIMIT 0,12' at line 14 in /home/vanral/public_html/app/classes/class-SystemBD.php on line 127