在下面的查询中,即使满足 position 和 category_id 条件,也没有检索到记录。
SELECT `jobs`.* FROM `jobs`
WHERE (interview_date >= '2012-05-03 17:54:41 +0530')
AND (position like '%ROR%'
AND category_id = '11'
AND experience_id = '5'
AND interview_address like '%%')
ORDER BY interview_date asc
但是对于满足 category_id 和 experience_id 条件的相同查询,我得到了结果。我完全糊涂了。
SELECT `jobs`.* FROM `jobs`
WHERE (interview_date >= '2012-05-03 17:55:07 +0530')
AND (position like '%%'
AND category_id = '11'
AND experience_id = '5'
AND interview_address like '%%')
ORDER BY interview_date asc
我使用了 AND 条件,但是当只满足两个条件时它会返回结果。我在这里错过了什么吗?
谢谢各位。