Annotation of embedaddon/php/ext/interbase/tests/ibase_rollback_001.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ibase_rollback(): Basic test
3: --SKIPIF--
4: <?php include("skipif.inc"); ?>
5: --FILE--
6: <?php
7:
8: require("interbase.inc");
9:
10: $x = ibase_connect($test_base);
11:
12: ibase_query('INSERT INTO test1 VALUES (100, 2)');
13: ibase_query('INSERT INTO test1 VALUES (100, 2)');
14: ibase_query('INSERT INTO test1 VALUES (100, 2)');
15:
16: $rs = ibase_query('SELECT COUNT(*) FROM test1 WHERE i = 100');
17: var_dump(ibase_fetch_row($rs));
18:
19: var_dump(ibase_rollback($x));
20:
21: $rs = ibase_query('SELECT COUNT(*) FROM test1 WHERE i = 100');
22: var_dump(ibase_fetch_row($rs));
23:
24: var_dump(ibase_rollback($x));
25: var_dump(ibase_rollback());
26:
27: ?>
28: --EXPECTF--
29: array(1) {
30: [0]=>
31: int(3)
32: }
33: bool(true)
34: array(1) {
35: [0]=>
36: int(0)
37: }
38: bool(true)
39:
40: Warning: ibase_rollback(): invalid transaction handle (expecting explicit transaction start) in %s on line %d
41: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>