[append db=base.db]values[/append] appends a new record with the specified field values to the end of a database.
numero = 196[append db=base.db][!][/!]name=Grant&[!][/!]address=1492 Street&[!][/!]zip=9000&[!][/!]date=[date][!][/!][/append]The database "base.db" is opened, and a new record is added to the end. The field name "name" is set to "Grant," the field name "address" is set to "1492 Street," the field name "zip" is set to "9000," and the field name "date" is set to the current date. Notice that any WebDNA [xxx] tags inside the context are first substituted for their real values before being written to the database. The name of the database itself may also be an [xxx] tag, as in "[append [formvariable]]."Any field names not existing in the database are ignored, and any fields you do not specify are left blank in the new record. Certain letters are illegal, such as
You can specifiy a WebDNA [table], in place of a db file, in the Append context. For example: [append table=TableName]values[/append]
Some database filenames are reserved. You may not create your own database named "WebCatalog Prefs," "Users.db," "ErrorMessages.db," "StandardConversions.db," or "Triggers.db"
Normally all database file paths are relative to the local template, or if they begin with "/" they are relative to the web server's virtual host root. You may optionally put "^" in front of the file path to indicate the file can be found in a global root folder called "Globals" inside the WebCatalogEngine folder. This global root folder is the same regardless of the virtual host.
You can use the 'AUTONUMBER=' parameter with the [append] or [replace] context to instruct WebDNA to automatically generate the 'next highest number' value for the given fieldname. This is useful for 'ID' type fields, where unique values are required. Here is a demonstration of the AUTONUMBER feature using a WebDNA TABLE (of course this will work on database files as well). Example WebDNA code:[table name=table_1&fields=ID,NAME,EMAIL][/table][append table=table_1&autonumber=ID]NAME=Scott&EMAIL=scott@here.com[/append][append table=table_1&autonumber=ID]NAME=Lee&EMAIL=lee@there.com[/append][append table=table_1&autonumber=ID]NAME=OMNI&EMAIL=omni@everywhere.com[/append][delete table=table_1&eqIDdata=2][append table=table_1&autonumber=ID]NAME=Lee&EMAIL=lee@there.com[/append][search table=table_1&neIDdata=[blank]][founditems][ID] - [NAME] - [EMAIL][/founditems][/search]Results:1 - Scott - scott@here.com3 - OMNI - omni@everywhere.com4 - Lee - lee@there.comYou can see that WebDNA automatically generated the ID value by calculating the 'next largest value', given the existing ID values in the table.
You can use [thisautonumber] tag from within an [append] or [replace] context, to retrieve the current auto-generated number (if the AUTONUMBER parameter was used).
Optional Context Parameters[append db=base.db][!]
[/!]name=Grant&[!]
[/!]address=1492 Street&[!]
[/!]zip=9000&[!]
[/!]date=[date][!]
[/!][/append]
You can specifiy a WebDNA [table], in place of a db file, in the Append context. For example: [append table=TableName]values[/append]
Some database filenames are reserved. You may not create your own database named "WebCatalog Prefs," "Users.db," "ErrorMessages.db," "StandardConversions.db," or "triggers.db"
Normally all database file paths are relative to the local template, or if they begin with "/" they are relative to the web server's virtual host root. You may optionally put "^" in front of the file path to indicate the file can be found in a global root folder called "Globals" inside the WebCatalogEngine folder. This global root folder is the same regardless of the virtual host.
[table name=table_1&fields=ID,NAME,EMAIL][/table]
[append table=table_1&autonumber=ID]NAME=Scott&EMAIL=scott@here.com[/append]
[append table=table_1&autonumber=ID]NAME=Lee&EMAIL=lee@there.com[/append]
[append table=table_1&autonumber=ID]NAME=OMNI&EMAIL=omni@everywhere.com[/append]
[delete table=table_1&eqIDdata=2]
[append table=table_1&autonumber=ID]NAME=Lee&EMAIL=lee@there.com[/append]
[search table=table_1&neIDdata=[blank]]
[founditems]
[ID] - [NAME] - [EMAIL]
[/founditems]
[/search]
You can use [thisautonumber] tag from within an [append] or [replace] context, to retrieve the current auto-generated number (if the AUTONUMBER parameter was used).
DOWNLOAD WEBDNA NOW!
Amazon Web Services (AWS) README for Machine Image ID...
Download WebDNA ApplicationsWebDNA applications...
[biotype]BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...
WebDNA LibrariesA list of available libraries for WebDNA...
Technical Change HistoryThis Technical Change History provides a reverse chronological list of WebDNA changes...
Tips and TricksA list of user-submitted tips ...
...
[search]Use the [Search] context with [founditems] to easily retrieve records from your databases...
[boldwords]Highlights matching words with boldface HTML tags...
[exclusivelock]Prevents other threads from simultaneously accessing a group of databases...
[math][math] calculates equations using numbers...
[createfolder]Create an empty folder on your webspace...