I have a simple query that consistantly returns the wrong results which makes me think I'm missing something here.
The query is:
SELECT * FROM `helpdesk` WHERE user = 'smith' OR mgr = 'smith' AND complete = '2'
This should return all rows with smith as the user or the manager and only if the 'complete' value is 2.
However I get complete with 1 as the value in my result set.
Can anyone tell me what I'm doing wrong?
The query is:
SELECT * FROM `helpdesk` WHERE user = 'smith' OR mgr = 'smith' AND complete = '2'
This should return all rows with smith as the user or the manager and only if the 'complete' value is 2.
However I get complete with 1 as the value in my result set.
Can anyone tell me what I'm doing wrong?