reference/pdo/transactions.xml
eae19eb5fe0f5bebcbce382ea7a505cedeb5a883
...
...
@@ -27,12 +27,12 @@
27
27
connection. Auto-commit mode means that every query that you run has its
28
28
own implicit transaction, if the database supports it, or no transaction
29
29
if the database doesn't support transactions. If you need a transaction,
30
-
you must use the <function>PDO::beginTransaction</function> method to
30
+
you must use the <methodname>PDO::beginTransaction</methodname> method to
31
31
initiate one. If the underlying driver does not support transactions, a
32
32
PDOException will be thrown (regardless of your error handling settings:
33
33
this is always a serious error condition). Once you are in a transaction,
34
-
you may use <function>PDO::commit</function> or
35
-
<function>PDO::rollBack</function> to finish it, depending on the success
34
+
you may use <methodname>PDO::commit</methodname> or
35
+
<methodname>PDO::rollBack</methodname> to finish it, depending on the success
36
36
of the code you run during the transaction.
37
37
</para>
38
38
<warning>
...
...
@@ -59,7 +59,7 @@
59
59
<warning>
60
60
<para>
61
61
The automatic rollback only happens if you initiate the transaction via
62
-
<function>PDO::beginTransaction</function>. If you manually issue a
62
+
<methodname>PDO::beginTransaction</methodname>. If you manually issue a
63
63
query that begins a transaction PDO has no way of knowing about it and
64
64
thus cannot roll it back if something bad happens.
65
65
</para>
...
...
@@ -72,8 +72,8 @@
72
72
In addition to entering the basic data for that person, we also need to
73
73
record their salary. It's pretty simple to make two separate updates,
74
74
but by enclosing them within the
75
-
<function>PDO::beginTransaction</function> and
76
-
<function>PDO::commit</function> calls, we are guaranteeing that no one
75
+
<methodname>PDO::beginTransaction</methodname> and
76
+
<methodname>PDO::commit</methodname> calls, we are guaranteeing that no one
77
77
else will be able to see those changes until they are complete. If
78
78
something goes wrong, the catch block rolls back all changes made
79
79
since the transaction was started, and then prints out an error
80
80