Summing a field full of numbers ...
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 10778
interpreted = N
texte = Hi Grant,I thought you'd like to know that when I put the following syntaxinto a template that searches thru a 16,000 record database, the mathdoes *not* choke on the very long string of number it has to add toget the results. You mentioned earlier that the [math] might not beable to handle such a long calculation, but it does just fine![search db=listings.db&nepricedata=0][format thousands .1f][math]([founditems][price]+[/founditems]0)/1000000[/math][/format][/search]This WebDNA takes about 22 seconds to get the results, so it's not afast response ... but remember, it's adding 16,000 number, each ofwhich has six figures.I'm not going to have WebCat2 calculate this everytime someone looksat the page, but I would like to calculate this number once a day soI can store the value in a database, then it will take only afraction of a second to retrieve that value with a lookup ... :)Sincerely,Ken
Associated Messages, from the most recent to the oldest:
|
- Summing a field full of numbers ... (Kenneth Grome 1997)
|
Hi Grant,I thought you'd like to know that when I put the following syntaxinto a template that searches thru a 16,000 record database, the mathdoes *not* choke on the very long string of number it has to add toget the results. You mentioned earlier that the
[math] might not beable to handle such a long calculation, but it does just fine![search db=listings.db&nepricedata=0][format thousands .1f]
[math](
[founditems][price]+[/founditems]0)/1000000[/math][/format][/search]This WebDNA takes about 22 seconds to get the results, so it's not afast response ... but remember, it's adding 16,000 number, each ofwhich has six figures.I'm not going to have WebCat2 calculate this everytime someone looksat the page, but I would like to calculate this number once a day soI can store the value in a database, then it will take only afraction of a second to retrieve that value with a lookup ... :)Sincerely,Ken
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
[taxRate] [TaxTotal] ? (1997)
WebCatalog not running after upgrade (2000)
[shell] (2003)
Generating unique SKU from [cart] (1997)
[REFERRER] works with form posts (2003)
[WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (2010)
denied access (1997)
WebCat2final1 crashes (1997)
Referrer field to header field conversion (1997)
problems with 2 tags (1997)
Moment of Thanks (1997)
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)
WebCat2 beta FTP site (1997)
Can I invoke an ssi plugin from within a webcat page (1997)
X etc.... (1999)
WebCat2b13MacPlugIn - More limits on [include] (1997)
Bug or syntax error on my part? (1997)
WYSIWYG Editor? (2006)
Problems with [Search] param - Mac Plugin b15 (1997)
Forcing Search w/ URL (1999)