summaryrefslogtreecommitdiff
path: root/ext/pdo_firebird/tests/bug_74462.phpt
blob: 52033decca30bf5b993883da0d3657b270cb816a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--TEST--
PDO_Firebird: Bug #74462 Returns only NULLs for boolean fields
--SKIPIF--
<?php if (!extension_loaded('interbase') || !extension_loaded('pdo_firebird')) die('skip');
?>
--FILE--
<?php
require 'testdb.inc';
$C = new PDO('firebird:dbname='.$test_base, $user, $password) or die;
@$C->exec('drop table atable');
$C->exec('create table atable (id integer not null, abool boolean)');
$C->exec('insert into atable (id, abool) values (1, true)');
$C->exec('insert into atable (id, abool) values (2, false)');
$C->exec('insert into atable (id, abool) values (3, null)');
$S = $C->query('select abool from atable order by id');
$D = $S->fetchAll(PDO::FETCH_COLUMN);
unset($S);
unset($C);
var_dump($D);
?>
--EXPECT--
array(3) {
  [0]=>
  bool(true)
  [1]=>
  bool(false)
  [2]=>
  NULL
}