Technical References - [table]

[table] allows you to quickly create a temporary 'in line' database that is local to the template and not part of the global database cache. A table can be used in any context that accepts a database 'db' as a parameter (using the syntax table=tablename).

numero = 132
interpreted = N
texte = With [table], you define the name of the table and the fields. Between the table tags, you populate the table with tab delimited values, with the record separated by returns, just like a .db file. Don't worry about how the browser handles tabs and returns; the browser never sees them! WebDNA does its magic before the page is given to the browser.
[table name=yourtablename&fields=field1,field12,field3]value     value     valuevalue     value     valuevalue     value     value[/table]
Tables can be static (such as a simple from/to db for a [convertchars] context) or dynamic, such as a file listing. In the latter, the table allows you to further search and sort a directory of files. Example
[table name=filelisting&fields=fname,fsize,fdate][listfiles images/uploads][filename]       [size]       [moddate][/listfiles][/table]
[search table=filelisting&nefnamedatarq=[blank]&fsizesort=1][founditems][filename] ([fsize]), [fdate]<br>[/founditems][/search]
You could use this to offer three different sort options for the file listing, something [listfiles] alone can't do.

You can declare a table by using the context without adding records. Then, later on the page, you can use append and replace (and delete, for that matter) to populate the table. Then when you're done with all that, do your search.

Parameter Description
nameThe name used to reference the table during the duration of the template.
fieldsA comma delimited, ordered, list of fieldnames to be used for the table.
Another example to replace each letter of the alphabet with the corresponding number:
[text]alphabet=abcdefghijklmnopqrstuvwxyz[/text][table name=t1&fields=from,to][listchars chars=[alphabet]][char]        [index][/listchars][/table][convertchars table=t1]this is your text[/convertchars]
result: 208919 919 25152118 2052420 With [table], you define the name of the table and the fields. Between the table tags, you populate the table with tab delimited values, with the record separated by returns, just like a .db file. Don't worry about how the browser handles tabs and returns; the browser never sees them! WebDNA does its magic before the page is given to the browser.

[table name=yourtablename&fields=field1,field12,field3]
value value value
value value value
value value value
[/table]

Tables can be static (such as a simple from/to db for a [convertchars] context) or dynamic, such as a file listing. In the latter, the table allows you to further search and sort a directory of files.

Example
[table name=filelisting&fields=fname,fsize,fdate]
[listfiles images/uploads][filename] [size] [moddate]
[/listfiles]
[/table]


[search table=filelisting&nefnamedatarq=[blank]&fsizesort=1]
[founditems]
[filename] ([fsize]), [fdate]<br>
[/founditems]
[/search]


You could use this to offer three different sort options for the file listing, something [listfiles] alone can't do.

You can declare a table by using the context without adding records. Then, later on the page, you can use append and replace (and delete, for that matter) to populate the table. Then when you're done with all that, do your search.



Parameter Description
nameThe name used to reference the table during the duration of the template.
fieldsA comma delimited, ordered, list of fieldnames to be used for the table.


Another example to replace each letter of the alphabet with the corresponding number:
[text]alphabet=abcdefghijklmnopqrstuvwxyz[/text]

[table name=t1&fields=from,to]
[listchars chars=[alphabet]]
[char] [index]
[/listchars]
[/table]

[convertchars table=t1]this is your text[/convertchars]

result:

208919 919 25152118 2052420

Terry Wilson

DOWNLOAD WEBDNA NOW!

Top Articles:

Download WebDNA Applications

WebDNA applications...

[biotype]

BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...

F.A.Q

A compilation of some user's questions...

WebDNA Modules

A list of the currently available modules...

WebDNA Libraries

A list of available libraries for WebDNA...

Tips and Tricks

A list of user-submitted tips ...

Related Readings:

[cookie]

Cookies are a great way to remember visitors...

Implement BioType

Here is the JavaScript code that captures the keystroke dynamics of a demo user and how to make WebDNA analyze it...

ODBC

UNIX: Setting up WebDNA - ODBC - Database Server...

[authenticate]

WebDNA provides a few options for password protecting your pages...

[table]

[table] allows you to quickly create a temporary 'in line' database that is local to the template and not part of the global database cache...

[deletefolder]

Deletes a folder from your website...