A Database Error Occurred

Error Number: 1525

Incorrect DATETIME value: '(CURDATE() - INTERVAL 30 DAY AND CURDATE())'

SELECT `ci_student`.`username`, `ci_student`.`id`, `ci_student`.`img`, `ci_student`.`gender_type` as `gender`, count(ci_post.user_id) as count_num, (SELECT count(*) from ci_vote where post_type="capability" and ci_vote.post_id = ci_post.id and ci_vote.vote_type = "plus") - (SELECT count(*) from ci_vote where post_type="capability" and ci_vote.post_id = ci_post.id and ci_vote.vote_type = "minus") as tot_vote FROM `ci_post` JOIN `ci_student` ON `ci_post`.`user_id` = `ci_student`.`id` WHERE `ci_post`.`post_type` = 'capability' AND `ci_post`.`status` = 'active' AND FROM_UNIXTIME(ci_post.create_at) >= '(CURDATE() - INTERVAL 30 DAY AND CURDATE())' GROUP BY `ci_post`.`user_id` ORDER BY `count_num` desc, `tot_vote` desc LIMIT 5

Filename: controllers/Site.php

Line Number: 415