FROM
contact c
INNER JOIN
display_status d
ON
(
c.display_status_id = d.id
AND
d.is_active = 1
AND
d.is_viewable = 1
)
This way, by the time we get to the WHERE clause, we will have already excluded rows where is_active and is_viewable do not equal 1.
Login in to like
Login in to comment