reference/ibm_db2/functions/db2-autocommit.xml
61374bbe228e8e9c55a24aba59a1e2bb2a871148
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
4
3
<refentry xml:id="function.db2-autocommit" xmlns="http://docbook.org/ns/docbook">
5
4
<refnamediv>
6
5
<refname>db2_autocommit</refname>
...
...
@@ -11,9 +10,9 @@
11
10
<refsect1 role="description">
12
11
&reftitle.description;
13
12
<methodsynopsis>
14
-
<type>mixed</type><methodname>db2_autocommit</methodname>
13
+
<type class="union"><type>int</type><type>bool</type></type><methodname>db2_autocommit</methodname>
15
14
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
16
-
<methodparam choice="opt"><type>bool</type><parameter>value</parameter></methodparam>
15
+
<methodparam choice="opt"><type>int</type><parameter>value</parameter></methodparam>
17
16
</methodsynopsis>
18
17

19
18
<para>
...
...
@@ -41,7 +40,7 @@
41
40
One of the following constants:
42
41
<variablelist>
43
42
<varlistentry>
44
-
<term><literal>DB2_AUTOCOMMIT_OFF</literal></term>
43
+
<term><constant>DB2_AUTOCOMMIT_OFF</constant></term>
45
44
<listitem>
46
45
<para>
47
46
Turns AUTOCOMMIT off.
...
...
@@ -49,7 +48,7 @@
49
48
</listitem>
50
49
</varlistentry>
51
50
<varlistentry>
52
-
<term><literal>DB2_AUTOCOMMIT_ON</literal></term>
51
+
<term><constant>DB2_AUTOCOMMIT_ON</constant></term>
53
52
<listitem>
54
53
<para>
55
54
Turns AUTOCOMMIT on.
...
...
@@ -69,7 +68,8 @@
69
68
When <function>db2_autocommit</function> receives only the
70
69
<parameter>connection</parameter> parameter, it returns the current state
71
70
of AUTOCOMMIT for the requested connection as an integer value. A value of
72
-
0 indicates that AUTOCOMMIT is off, while a value of 1 indicates that
71
+
<constant>DB2_AUTOCOMMIT_OFF</constant> indicates that AUTOCOMMIT is off,
72
+
while a value of <constant>DB2_AUTOCOMMIT_ON</constant> indicates that
73
73
AUTOCOMMIT is on.
74
74
</para>
75
75
<para>
...
...
@@ -97,7 +97,7 @@
97
97
$options = array('autocommit' => DB2_AUTOCOMMIT_OFF);
98
98
$conn = db2_connect($database, $user, $password, $options);
99
99
$ac = db2_autocommit($conn);
100
-
if ($ac == 0) {
100
+
if ($ac == DB2_AUTOCOMMIT_OFF) {
101
101
print "$ac -- AUTOCOMMIT is off.";
102
102
} else {
103
103
print "$ac -- AUTOCOMMIT is on.";
...
...
@@ -132,7 +132,7 @@ if ($rc) {
132
132

133
133
// Check AUTOCOMMIT state
134
134
$ac = db2_autocommit($conn);
135
-
if ($ac == 0) {
135
+
if ($ac == DB2_AUTOCOMMIT_OFF) {
136
136
print "$ac -- AUTOCOMMIT is off.";
137
137
} else {
138
138
print "$ac -- AUTOCOMMIT is on.";
...
...
@@ -163,7 +163,6 @@ Turning AUTOCOMMIT on succeeded.
163
163
</refsect1>
164
164

165
165
</refentry>
166
-

167
166
<!-- Keep this comment at the end of the file
168
167
Local variables:
169
168
mode: sgml
170
169