Hi guys I am having issue
I have this query:
SELECT * FROM useraccount
WHERE
(FirstName LIKE '%a%') OR
(LastName LIKE '%a%') AND
(Company = '131') AND
(Type = '4')
GROUP BY ID
but it is not functioning as I want. For example LIKE function should be like this. But must be 131 and type 4. it is not taking this two features.
You will need to add some extra parentheses around the
ORpart:This is because
ANDhave higher precedence (i.e., will be evaluated before)OR. You can read more about this at the Operator Precedence page in the manual.