Database error: Invalid SQL: SELECT *, DATEDIFF(deal_date_inserted, NOW()) AS deal_age, FLOOR(HOUR(TIMEDIFF(deal_date_end, NOW()))/24) AS deal_days_left,(HOUR(T AND deal_date_end >= now()IMEDIFF(deal_date_end, NOW())) - (FLOOR(HOUR(TIMEDIFF(deal_date_end, NOW()))/24)*24)) AS deal_hours_left, MINUTE(TIMEDIFF(deal_date_end, NOW())) AS deal_minutes_left from t_deal tD INNER JOIN t_server tS ON tS.server_id = tD.fk_server_id INNER JOIN t_city tC ON tC.city_id = tD.fk_city_id WHERE tS.server_is_visible=1 AND fk_affiliate_id > 0 AND deal_date_end >= now() AND deal_is_visible=1 and deal_date_start <= now() ORDER BY (tS.server_provision_priority + tS.server_popularity_priority - DATEDIFF(NOW(), deal_date_start) - (CASE deal_customers WHEN 0 THEN 1 ELSE 0 END)) DESC, deal_date_inserted DESC LIMIT 0, 100 Database Error: 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 'IMEDIFF(deal_date_end, NOW())) - (FLOOR(HOUR(TIMEDIFF(deal_date_end, NOW()))/24)' at line 1
MySQL Error
Session halted.