Formatting a long list in a table

How to show the result of a search as a table, for instance a 30 row per 10 columns table.

numero = 43
interpreted = N
texte =
[Search db=bases.db&nefacturadata=0&facturasort=1&facturatype=num&facturasdir=de&max=300]<table border="0" cellspacing="1" cellpadding="1" bgcolor="white"><tr>[FoundItems]<td>[n_factura_rte]</td>[showif [index]\10]</tr><tr>[/showif][/FoundItems][hideif [numfound]\10]</tr>[/hideif]</table>[/search]
Explanation: First, move the original <tr>...</tr> outside of the founditems loop. The founditems loop keeps track of which founditem you currently are focused on. The backslash operator in the showif comparison says "is divisible by", i.e., "is [index] divisible by 10?" If so, close out the current table row and begin a new one. The last comparison makes sure that there is not an extraneous </tr> in the case when the number of items returned is also divisible by 10.
[Search db=bases.db&nefacturadata=0&facturasort=1
&facturatype=num&facturasdir=de&max=300]
<table border="0" cellspacing="1" cellpadding="1" bgcolor="white">
<tr>
[founditems]
<td>[n_factura_rte]</td>
[showif [index]\10]
</tr><tr>
[/showif]
[/FoundItems]
[hideif [numfound]\10]</tr>[/hideif]
</table>
[/search]

Explanation: First, move the original <tr>...</tr> outside of the founditems loop. The founditems loop keeps track of which founditem you currently are focused on. The backslash operator in the showif comparison says "is divisible by", i.e., "is [index] divisible by 10?" If so, close out the current table row and begin a new one.

The last comparison makes sure that there is not an extraneous </tr> in the case when the number of items returned is also divisible by 10. Joe D'Andrea

DOWNLOAD WEBDNA NOW!

Top Articles:

WebDNA Modules

A list of the currently available modules...

WebDNA Libraries

A list of available libraries for WebDNA...

[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...

Tips and Tricks

A list of user-submitted tips ...

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

Related Readings:

reCAPTCHA code

reCAPTCHA helps prevent automated abuse of your site (such as comment spam or bogus registrations) by using a CAPTCHA to ensure that only humans perform certain actions...

WebDNA Google Map Mashup

Generate a Google map with pins on your database addresses...

How old am I?

You want to express an age in years given the dob (mm/dd/yyyy) and today's date...

Hideif on IP range

This will show or hide stuff according to the IP...

Removing whitespace

How can I remove all whitespace entered by a user from an input box (ie card number)...

Check the Federal Government's Social Security database

The script on the page will check the federal government's social security database...