我有以下 MYSQL 语法,但是当我运行它时,检查 MYSQL 手册的语法是否正确时出错。
MYSQL 查询是:
SELECT `listings`.sid FROM listings
LEFT JOIN `listings_properties` `lp` ON `lp`.`object_sid` = `listings`.`sid` AND `lp`.`id` = \'ClosingDate\'
WHERE (expiration_date < NOW() OR `lp`.`value` <= NOW()) AND active = 1