v5:userguide:transactions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
v5:userguide:transactions [2018/07/01 23:02] – prefer functions start lowercase (#430) peterdd | v5:userguide:transactions [2020/08/26 10:09] (current) – [Usage] Add braces as suggested by @peterdd in #629 dregad | ||
---|---|---|---|
Line 46: | Line 46: | ||
$ok = $conn-> | $ok = $conn-> | ||
- | if ($ok) | + | if ($ok) { |
/* | /* | ||
* The previous execution succeeded, do some more | * The previous execution succeeded, do some more | ||
| | ||
$ok = $conn-> | $ok = $conn-> | ||
- | else | + | } else { |
/* | /* | ||
* Branch, do some other work, then return | * Branch, do some other work, then return | ||
*/ | */ | ||
- | if (!$ok) | + | } |
+ | |||
+ | if (!$ok) | ||
/* | /* | ||
* Test the last insertion, if not successful roll | * Test the last insertion, if not successful roll | ||
Line 61: | Line 63: | ||
*/ | */ | ||
$conn-> | $conn-> | ||
- | else | + | } else { |
/* | /* | ||
* Go ahead and commit | * Go ahead and commit | ||
*/ | */ | ||
$conn-> | $conn-> | ||
+ | } | ||
</ | </ | ||
----------------------------- | ----------------------------- |
v5/userguide/transactions.1530478975.txt.gz · Last modified: 2018/07/01 23:02 by peterdd