An exception occurred in shop's script

  • Error type: MySQL Error
  • Source, line: Parser::tws_page_items[68]
  • Error message: 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 '-16, 24' at line 8
 SELECT store.*, DATEDIFF(NOW(), store.create_time) AS d 
                FROM ms_topic_store topic_store 
                    JOIN ms_store store
                        ON topic_store.store_id = store.id
                WHERE store.kind_key = 'kPromo'
                    AND topic_store.topic_id = '636' AND store.no_visible=0
                ORDER BY CASE WHEN d > 0 THEN d*1000000000 ELSE -1*d END
                LIMIT -16, 24