xref: /PHP-8.4/ext/odbc/tests/odbc_commit_001.phpt (revision 66acaba9)
1--TEST--
2odbc_commit(): Basic test for odbc_commit()
3--EXTENSIONS--
4odbc
5--SKIPIF--
6<?php include 'skipif.inc'; ?>
7--FILE--
8<?php
9
10include 'config.inc';
11
12$conn = odbc_connect($dsn, $user, $pass);
13odbc_exec($conn, 'CREATE TABLE commit_table (test INT)');
14
15odbc_autocommit($conn, false);
16odbc_exec($conn, 'INSERT INTO commit_table VALUES(1)');
17var_dump(odbc_commit($conn));
18
19$res = odbc_exec($conn, 'SELECT * FROM commit_table');
20var_dump(odbc_result($res, "test"));
21
22?>
23--CLEAN--
24<?php
25require 'config.inc';
26$conn = odbc_connect($dsn, $user, $pass);
27odbc_exec($conn, 'DROP TABLE commit_table');
28?>
29--EXPECT--
30bool(true)
31string(1) "1"
32