xref: /php-src/ext/pdo_pgsql/tests/bug61267.phpt (revision 6fb81d23)
1--TEST--
2PDO::exec() returns 0 when the statement is a SELECT.
3--EXTENSIONS--
4pdo_pgsql
5--SKIPIF--
6<?php
7require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
8require_once __DIR__ . '/config.inc';
9PDOTest::skip();
10?>
11--FILE--
12<?php
13require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
14require_once __DIR__ . '/config.inc';
15$db = PDOTest::test_factory(__DIR__ . '/common.phpt');
16
17$res = $db->exec('SELECT * from generate_series(1, 42);');
18var_dump($res);
19echo "Done\n";
20?>
21--EXPECT--
22int(0)
23Done
24