Demand Environment:
Function: resume search
Requirement: You can select either full-time, part-time, temporary, or intern, but only one type of resume is required. You must list all your resumes that meet any of the requirements.
Obstacle: if any of the or conditions is TRUE, the judgment is stopped, and the and condition returns the intersection.
SELECT
T_person_info.personid,
T_person_info.personname,
T_person_info.sex,
T_person_edu.education,
T_person_edu.school,
T_person_edu. 'subobject ',
T_person_edu. 'to'
FROM
T_person_info
Left join t_person_edu ON t_person_edu.personid = t_person_info.personid
WHERE 1 = 1
AND (type = 3 OR type = 1)
AND (company = 222 OR company = 'hubei Index ')
When 14 and 15 rows are viewed, the conditions or conditions in the brackets are preferentially executed, and then the nearest condition on the left of the brackets is executed. This condition is applicable to the union of the same field.
This article is from the "golden pig's PHP growth path" blog