Moudro dne
SQL vrací bool ve stringu!
$foo = true;
$bar = 't';
$bar2 = 'f';
$foo == bar;
$foo == bar2;
$foo !== bar;
$bar2 !== false;
$bar2 != false;
CREATE TABLE test1 (a boolean, b text);
INSERT INTO test1 VALUES (TRUE, 'true');
INSERT INTO test1 VALUES (FALSE, 'false');
SELECT * FROM test1;
a | b
---+---------
t | true
f | false
SELECT * FROM test1 WHERE a;
a | b
---+---------
t | true
INSERT INTO test1 VALUES (TRUE, 'true');
INSERT INTO test1 VALUES (FALSE, 'false');
SELECT * FROM test1;
a | b
---+---------
t | true
f | false
SELECT * FROM test1 WHERE a;
a | b
---+---------
t | true