v5:reference:connection:settransactionmode
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
reference:settransactionmode [2015/08/07 04:32] – created mnewnham | v5:reference:connection:settransactionmode [2018/06/11 10:23] (current) – [Usage] function names starting with lowercase (#426) dregad | ||
---|---|---|---|
Line 2: | Line 2: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
<WRAP right box> | <WRAP right box> | ||
+ | == See Also == | ||
+ | [[v5: | ||
+ | |||
== Syntax == | == Syntax == | ||
void setTransactionMode( | void setTransactionMode( | ||
Line 9: | Line 12: | ||
===== Description ===== | ===== Description ===== | ||
- | SetTransactionMode allows you to pass in the transaction mode to use for all subsequent transactions. Note: if you have persistent connections and using mssql or mysql, you might have to explicitly reset your transaction mode at the beginning of each page request. This is only supported in postgresql, mssql, mysql with InnoDB and oci8 currently. | + | SetTransactionMode allows you to pass in the transaction mode to use for all subsequent transactions. |
+ | |||
+ | Note: if you have persistent connections and using mssql or mysql, you might have to explicitly reset your transaction mode at the beginning of each page request. | ||
+ | |||
+ | This is only supported in postgresql, mssql, mysql with InnoDB and oci8 currently. | ||
===== Usage ===== | ===== Usage ===== | ||
<code php> | <code php> | ||
- | + | /* | |
- | $db->SetTransactionMode(" | + | * Set the mode |
- | $8db->BeginTrans(); | + | */ |
- | $db->Execute(...); $db->Execute(...); | + | $db->setTransactionMode(' |
- | $db->CommitTrans(); | + | $db->beginTrans(); |
+ | $db->execute(...); $db->execute(...); | ||
+ | $db->commitTrans(); | ||
- | $db->SetTransactionMode("" | + | /* |
- | $db->StartTrans(); | + | * restore to default |
- | $db->Execute(...); $db->Execute(...); | + | */ |
- | $db->CompleteTrans(); | + | $db->setTransactionMode("" |
+ | $db->startTrans(); | ||
+ | $db->execute(...); | ||
+ | $db->execute(...); | ||
+ | $db->completeTrans(); | ||
</ | </ | ||
Supported values to pass in: | Supported values to pass in: |
v5/reference/connection/settransactionmode.txt · Last modified: 2018/06/11 10:23 by dregad