It's not like 4 = True (True being a constant in MySQL).
All it is that you're offering something that's not False. So
... column = 3 or 10000
is also true.
mysql> select 4 is True;
+-----------+
| 4 is True |
+-----------+
| 1 |
+-----------+
1 row in set (0.00 sec)
mysql> select 77 is True;
+------------+
| 77 is True |
+------------+
| 1 |
+------------+
1 row in set (0.00 sec)
I'm using v5.0.67
Download the MySQL Manual for your version at:
http://dev.mysql.com/doc/#refman
Checkout Chapter 11.2.3. Comparison Functions and Operators
IS boolean_value
Tests a value against a boolean value, where boolean_value can be TRUE, FALSE, or UNKNOWN.
mysql> SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;
-> 1, 1, 1
IS boolean_value syntax was added in MySQL 5.0.2.
>
Thanks, Jay