« Domů | Moudro dne »

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

O autorovi

  • Jméno Cyph3r
  • Bydliště Praha 3
  • Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.
Můj profil