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