I’m currently trying to get a query to work and would like a bit of guidance
SELECT *
FROM users
WHERE username = 'bob'
AND device_1 = 'test'
OR device_2 = 'test'
OR device_3 = 'test'
It seems to be displaying any row with the word test in it no matter if I’m specifying the username or not.
I’m quite lost with this, its most probably something simple and I’m looking straight past it.
Add some parentheses to the
WHEREclause otherwise theusernamefilter is only applied todevice_1 = 'test':