Annotation of embedaddon/php/ext/pdo_sqlite/tests/bug33841.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: PDO SQLite Bug #33841 (rowCount() does not work on prepared statements)
3: --SKIPIF--
4: <?php # vim:ft=php
5: if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
6: ?>
7: --FILE--
8: <?php
9: require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
10: $db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
11:
12: $db->exec('CREATE TABLE test (text)');
13:
14: $stmt = $db->prepare("INSERT INTO test VALUES ( :text )");
15: $stmt->bindParam(':text', $name);
16: $name = 'test1';
17: var_dump($stmt->execute(), $stmt->rowCount());
18:
19: $stmt = $db->prepare("UPDATE test SET text = :text ");
20: $stmt->bindParam(':text', $name);
21: $name = 'test2';
22: var_dump($stmt->execute(), $stmt->rowCount());
23:
24: --EXPECT--
25: bool(true)
26: int(1)
27: bool(true)
28: int(1)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>