SELECT `post`.*, `user_account`.`project_name`
FROM
`post`
INNER JOIN `user_account` ON `post`.`user_id` = `user_account`.`user_id`
WHERE
`post`.`deleted_at` IS NULL
AND `is_active` = 1
AND `deleted_at` IS NULL
AND `end` > '2013-10-09'
AND `user_account`.`project_name` LIKE '%intensiivkursus%'
OR (
`title` LIKE '%intensiivkursus%'
OR `topics` LIKE '%intensiivkursus%'
OR `target_group` LIKE '%intensiivkursus%'
OR `lectors` LIKE '%intensiivkursus%'
OR `timetable` LIKE '%intensiivkursus%'
)
GROUP BY
`post`.`id`
ORDER BY
`post`.`created_at` DESC
我希望这只会给出结果is_active = 1
,但由于某种原因,它给出了相反的结果。我得到 5 个结果,全部都是is_active = 0
我在这里缺少什么?