I have this query:
SELECT * FROM (`users`) WHERE `date_next_payment` <= \'2011-02-02\'
AND `status` = \'active\' OR `status` = \'past due\'
>
in
SELECT * FROM (`users`) WHERE `date_next_payment` <= '2011-02-02'
AND `status` = 'active' OR `status` = 'past due'
it will consider first date_next_payment <= '2011-02-02' AND status = 'active' and then the boolean answer of this will be done OR with status = 'past due'
While in
SELECT * FROM (`users`) WHERE `date_next_payment` <= '2011-02-02'
AND (`status` = 'active' OR `status` = 'past due')
First OR will be done and then And will be done... Thats y this will give the different answer