I have a 2 tables, one in which I have groups, the other where I set user restrictions of which groups are seen.
When I do LEFT JOIN and specify no condition, it shows me all records. When I do WHERE group_hide.hide!=’true’ it only shows these records that have false enum type set to them. With JOIN, other groups get the hide field set as “NULL”.
How can I make it so that it excludes only these that are set to true, and show everything else that has either NULL or false?
I have a 2 tables, one in which I have groups, the other where
Share
In MySQL you must use
IS NULLorIS NOT NULLwhen dealing with nullable values.HEre you should use
(group_hide.hide IS NULL OR group_hide.hide != 'true')