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