I have a table in which cells can be as follows:
user_group can be admin, allow, disallow
user_subscription can be all, penalty, autogoal
I need to get the records that correspond to the following expression:
All admin and allow where user_subscription == all`` orautogoal```
I tried to do it like this:
('SELECT * FROM USERS WHERE (user_group="allow" OR user_group="admin" AND user_subscription="autogoal" OR user_subscription="all")')
But it does not work. I have 2 entries in the database:
user_group=admin,user_subscription=```all``user_group=allow,user_subscription=```autogoal``
I always get only the second entry.
(c1 OR c2) AND (c3 OR c4)