I am trying to get all the rows with the specific session_id
and also that do not have '3223' for the group_with
column. So I have this SQL statement :
SELECT * FROM pr_cart WHERE session_id=203130570714 AND group_with != 3223
Which to me it looks fine, but for some reason it does not return anything.
In my table I have entries that should not meet the criteria. i.e.
session_id=203130570714 | group_with=3225
which should be returned.
session_id=203130570714 | group_with=NULL
which should be returned.
session_id=203130570714 | group_with=3223
which should not be returned.
I tried:
<>
instead of!=
NOT (group_with=3223)
group_with NOT LIKE '3223'
How can I get all the rows with the specified session_id
and that also have a different number than 3223
for the group_with
edit session_id is varchar and group_with is int