How to show the result of a search as a table, for instance a 30 row per 10 columns table.
numero = 43[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]
DOWNLOAD WEBDNA NOW!
A compilation of some user's questions...
AWS Raw WebDNA LAMP-Plus WebServerAmazon Web Services (AWS) README for Machine Image ID...
WebDNA ModulesA list of the currently available modules...
Tips and TricksA list of user-submitted tips ...
WebDNA LibrariesA list of available libraries for WebDNA...
Technical Change HistoryThis Technical Change History provides a reverse chronological list of WebDNA changes...
...
PayPal gateway...
Spaghetti codeHow to get rid of very long search strings...
Handling credit card numbersEncrypting the credit card numbers does the job quite nicely...
How to setup CODA to work with WebDNA?This page will show graphically how to setup CODA as a WebDNA partner :-)...
Annoying character on writefileHow do I get rid of or convert the line feed character during a writefile?...