I have this query:
SELECT * FROM (`users`) WHERE `date_next_payment` <= \'2011-02-02\'
AND `status` = \'active\' OR `status` = \'past due\'
>
You are changing the condition when you are adding the parentheses.
In the initial case the result set consists of those records which satisfy the conditions
`date_next_payment` <= '2011-02-02' AND `status` = 'active'
or the condition
`status` = 'past due'.
After you add the parentheses the result set will consist of those records which satisfy the condition
`date_next_payment` <= '2011-02-02'
and any of the conditions
`status` = 'active'
or
`status` = 'past due'