I have a table in a database that looks as follows (parent_id is a fk to the same table):
+----+-----------+---------+
| id | parent_id | enabled |
+----+-----------+---------+
| 1 | null | 1 |
| 2 | 1 | 1 |
| 3 | null | 1 |
+----+-----------+---------+
The query:
SELECT * FROM category WHERE parent_id = 1
returns rows successfully as I would expect, however
SELECT * FROM category WHERE parent_id != 1
returns nothing.