Database Error; SQL: SELECT
DISTINCT
t.*
FROM `wp28401_posts` AS `t`
LEFT JOIN `wp28401_postmeta` AS `type_dannonce` ON
`type_dannonce`.`meta_key` = 'type_dannonce'
AND `type_dannonce`.`post_id` = `t`.`ID`
LEFT JOIN `wp28401_postmeta` AS `surface` ON
`surface`.`meta_key` = 'surface'
AND `surface`.`post_id` = `t`.`ID`
LEFT JOIN `wp28401_postmeta` AS `prix` ON
`prix`.`meta_key` = 'prix'
AND `prix`.`post_id` = `t`.`ID`
WHERE ( ( `type_dannonce`.`meta_value` = 'Acheter' ) AND ( `t`.`post_type` = "annonce" ) AND ( `t`.`post_status` IN ( "publish" ) ) )
ORDER BY CAST(`surface`.`meta_value`%20AS%20DECIMAL(10,2))%20DESC,%20CAST(`prix`.`meta_value`%20AS%20DECIMAL(10,2))%20ASC, `t`.`menu_order`, `t`.`post_title`, `t`.`post_date`
LIMIT 0, 15; Response: 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 ')%20DESC,%20CAST(`prix`.`meta_value`%20AS%20DECIMAL(10,2))%20ASC, `t`.`menu_orde' at line 24