append

Appends a new record with the specified field values to the end of a database.
[append db=base.db]cust=Grant&address=1492 High Street&zip=9000[/append]

Parameters

ParameterDescription
autonumberInstructs WebDNA to automatically generate the 'next highest number' value for the given fieldname.
Example WebDNA code:
[append db=base.db&autonumber=cust_id]cust=Grant&address=1492 High Street&zip=9000[/append]

The database "base.db" is opened, and a new record is added to the end. The field name "cust" is set to "Grant," the field name "address" is set to "1492 High Street" the field name "zip" is set to "9000," and the field name "date" is set to the current date.

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 <tab> or <carriage return>, so they are converted to <space> and <soft return> before being added to the database. Some computers use the two-character sequence <carriage return><line feed> to indicate a single end of line, which is automatically converted to a single <soft return> character before being added to the database.

You may specify an absolute or partial path to the database file, as in "/WebCatalog/folder/base.db" or "../base.db". Relative paths start in the same folder as the template, just like URLs, so "../" will look "up" one folder level from the template, and "/" will start at the web server's root.

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 specifiy a WebDNA [table], in place of a db file, in the Append context.
For example: [append table=TableName]values[/append]


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.


Some database filenames are reserved.
You may not create your own database named "WebCatalog Prefs," "Users.db," "ErrorMessages.db," "StandardConversions.db," or "Triggers.db"