SELECT `dpu_leg_respon`.* FROM `dpu_leg_respon` WHERE published=1 AND `dpu_leg_respon`.`big_round`= ORDER BY `reference_date` You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY `reference_date`' at line 4<\pre>