Loops through the enclosing text the specified number of times
numero = 245[loop start=1&end=[numAdd]&advance=1][append db=some.db]...[/append]Record [index] added.[/loop]Using the Loop context you can easily create a form to add an arbitrary number of records to a database. If you chose to add three records, the results would look like this: Record 1 added.Record 2 added.Record 3 added.The following parameters can be used to modify the [loop] context:
Parameter | Description |
---|---|
Start | The starting index value to begin looping. This value is required and may be positive or negative. |
End | The ending index value when looping. This value is required and may be positive or negative. |
Advance | (Optional) The amount to advance by when looping. This parameter is optional and may be positive or negative, the default value is 1. For example, [loop start=1&end=7&advance=2][index][/loop] would loop 4 times using [index] values 1,3,5,7. |
Tag | Description |
---|---|
[index] | Displays the current index number between or including Start and End. |
[break] | If the [loop] context sees the [break] tag while executing a loop, it will stop looping, once it finishes the current loop. Thus the [break] tag should only appear in a [showif] statement that is evaluated at the end (bottom) of the loop. |
[loop start=1&end=[numAdd]&advance=1]
[append db=some.db]...[/append]Record [index] added.
[/loop]
Parameter | Description |
---|---|
Start | The starting index value to begin looping. This value is required and may be positive or negative. |
End | The ending index value when looping. This value is required and may be positive or negative. |
Advance | (Optional) The amount to advance by when looping. This parameter is optional and may be positive or negative, the default value is 1. For example, [loop start=1&end=7&advance=2][index][/loop] would loop 4 times using [index] values 1,3,5,7. |
Tag | Description |
---|---|
[index] | Displays the current index number between or including Start and End. |
[break] | If the [loop] context sees the [break] tag while executing a loop, it will stop looping, once it finishes the current loop. Thus the [break] tag should only appear in a [showif] statement that is evaluated at the end (bottom) of the loop. |
DOWNLOAD WEBDNA NOW!
A list of available libraries for WebDNA...
WebDNA reference...
AWS Raw WebDNA LAMP-Plus WebServerAmazon Web Services (AWS) README for Machine Image ID...
WebDNA ModulesA list of the currently available modules...
Technical Change HistoryThis Technical Change History provides a reverse chronological list of WebDNA changes...
Tips and TricksA list of user-submitted tips ...
There is hardly a website that doesn't at some point need to send an email...
[encrypt][encrypt] and [decrypt] allow you to store sensitive data in your databases without risk of exposing it to prying eyes...
[scope]Explicitly define a block of WebDNA code that has a separate variable space...
[listfiles]When listing files...
[returnraw]Sends 'raw' MIME headers and data back to browser...
[append][append db=base...