This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
en:create:functions:dbset [24.01.2015 14:17] – [dbSet()] alexander.ritter | en:create:functions:dbset [24.01.2015 14:29] – [Example 2] alexander.ritter | ||
---|---|---|---|
Line 31: | Line 31: | ||
===== Example 2 ===== | ===== Example 2 ===== | ||
- | The following PHP code checks | + | The following PHP code checks |
<code php> | <code php> | ||
Line 51: | Line 51: | ||
</ | </ | ||
- | The counter is incremented | + | The counter is incremented |
<code php> | <code php> | ||
- | // Counter increments one | + | // Counter increments |
if (isset($counted)) { | if (isset($counted)) { | ||
$info = dbGet(reference()); | $info = dbGet(reference()); | ||
$info[1]++; | $info[1]++; | ||
dbSet(reference(), | dbSet(reference(), | ||
- | // Together with isset() it ensures it only counts | + | // Together with isset() it ensures it is counted |
$counted = true; | $counted = true; | ||
registerVariable(' | registerVariable(' |