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 syntax into a template that searches thru a 16,000 record database, the math does *not* choke on the very long string of number it has to add to get the results. You mentioned earlier that the [math] might not be able 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 a fast response ... but remember, it's adding 16,000 number, each of which has six figures.I'm not going to have WebCat2 calculate this everytime someone looks at the page, but I would like to calculate this number once a day so I can store the value in a database, then it will take only a fraction of a second to retrieve that value with a lookup ... :)Sincerely, Ken Associated Messages, from the most recent to the oldest:

    
  1. Summing a field full of numbers ... (Kenneth Grome 1997)
Hi Grant,I thought you'd like to know that when I put the following syntax into a template that searches thru a 16,000 record database, the math does *not* choke on the very long string of number it has to add to get the results. You mentioned earlier that the [math] might not be able 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 a fast response ... but remember, it's adding 16,000 number, each of which has six figures.I'm not going to have WebCat2 calculate this everytime someone looks at the page, but I would like to calculate this number once a day so I can store the value in a database, then it will take only a fraction 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:

Migrating to NT (1997) [RESOLVED, I THINK] -- [WebDNA] [append] does not add the newline char at the end of the new record?! (which can causes subsequent [search] to fail.) (2009) admin:admin won't work for login:password ! (1999) Multiple 'Users.db' files not possible (1997) search for non-unique question (2001) Trouble creating a temp database (2000) Calendar (1997) [TaxableTotal] - not working with AOL and IE (1997) Question about replacing words (1998) How do I access a shopping cart once it had been moved into (2000) Problems with webcat 2.01 for NT (1997) Any problems with Welcome & WebCat? (2000) Getting store builder store name (2005) [foundItems] context problem (2000) WebCat2: multiple currency support (1997) 'does not contain' operator needed ... (1997) Re:2nd WebCatalog2 Feature Request (1996) restart needed???? (1997) Custom formulas.db (1998) RE: E-mailer error codes (1997)