DEBUG: SQL = SELECT a.id FROM cms_module_coupon a WHERE (valid_from<=NOW() or valid_from is NULL) AND (valid_until>=NOW() or valid_until is NULL) AND status=2 AND type=1 AND default_city= ORDER BY priority_city DESC, created DESC, id DESC LIMIT 4
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 'ORDER BY priority_city DESC, created DESC, id DESC LIMIT 4' at line 2