v5:reference:connection:committrans
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| v5:reference:connection:committrans [2018/06/11 10:23] – [Usage] function names starting with lowercase (#426) dregad | v5:reference:connection:committrans [2021/04/26 14:02] (current) – as in sources: return bool instead of void, document optional parameter peterdd | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| <WRAP right box> | <WRAP right box> | ||
| == Syntax == | == Syntax == | ||
| - | | + | |
| + | optional bool $ok = true | ||
| + | | ||
| </ | </ | ||
| ===== Descriptions ===== | ===== Descriptions ===== | ||
| The function '' | The function '' | ||
| + | |||
| + | Set parameter $ok to true to commit, false to rollback the transaction. | ||
| + | |||
| + | Return bool true if successful. | ||
| --------------------------------- | --------------------------------- | ||
| ===== Usage ===== | ===== Usage ===== | ||
| Line 14: | Line 20: | ||
| $ok = $conn-> | $ok = $conn-> | ||
| - | if ($ok) | + | if ($ok) { |
| $ok = $conn-> | $ok = $conn-> | ||
| + | } | ||
| - | if (!$ok) | + | if (!$ok) |
| $conn-> | $conn-> | ||
| - | else | + | } else { |
| $conn-> | $conn-> | ||
| - | | + | } |
| </ | </ | ||
v5/reference/connection/committrans.1528705437.txt.gz · Last modified: by dregad
