Can I have something like this?
SELECT IF((SELECT COUNT(id) FROM table WHERE id = 1) = 0, 1, <nothing_to_happen>) AS Available
My goal is select this:
+---------+
|Available|
+---------+
|1 |
+---------+
Only if there is no row selected from this query:
SELECT id FROM table WHERE id = 1
If the row with id = 1 exists in table, I want my query to return zero rows! Is that possible?