SQLSTATE[42000]: Syntax error or access violation: 1064 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 `LNL`.`_n` , `PR`.`type` DESC, `T_` DESC' at line 1:SELECT `PR`.`e`,`PR`.`P`, `PR`.`type`, `LNL`.`_n`,`LNL`.`N1`,`LNL`.`G`,`LNL`.`PD1`,`LNL`.`att`,`LNL`.`Nk` FROM `LNL`RIGHT JOIN `LNL_price` AS `PR` ON `LNL`.`_n` = `PR`.`LN_n` && `PR`.`cur` = 'JPY' && `PR`.`T_` && `PR`.`T_` < 1732170215 && (1732170215 < `PR`.`_T`||`PR`.`_T`=0) && (`PR`.`type`=0||(`PR`.`type`=1 && `PR`.`data`='')||(`PR`.`type`=2 && `PR`.`data`='')) WHERE ORDER BY `LNL`.`_n` , `PR`.`type` DESC, `T_` DESC;