使用php和mysql查询保留场地的时间冲突

What would be the right algorithm for conflict schedule

$conflict = mysqli_query($connect, "SELECT venue_category 
                                    FROM user_venuereservation 
                                    WHERE start_of_venue < '$start_venue' 
                                    AND end_of_venue < '$end_venue' 
                                    AND end_of_venue < '$start_venue'") 
                or die("error");

Issue

Name: john
the venue the he reserve is court

date of venue 01/01/2017
start of venue 1:00PM
end of venue 3:00PM

then george he reserves venue at court also

date of venue 01/01/2017
start of venue 2:00PM
end of venue 4:00PM

the result must be alert as conflict

the second problem is

Name: John choose venue gym
date of venue 01/01/2017
start of venue 1:00PM
end of venue 3:00PM

no need to alert as conflict because different venue