Re: Summing fields in a search/founditems context??
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 36383
interpreted = N
texte = on 8/21/00 10:07 PM, Robert McPeak at robertmcpeak@hotmail.com wrote:> Would one of you whiz kids let me in on how to get a sum total of a> particular field in a founditems set.> > Let's say I've got a db with two fields, name and age. I want to do a> search for all unique names, and then add up all the ages to yield a total> age result.> > Bob 10> Joe 12> Nancy 13> > Total Age: 35> > Help??!If you're using 4.0 you can use the below context.New in 4.0[Sum field=fieldName] Calculates the numerical sum of all thefound records, using the fieldName column.Or create a math var outside the founditems loop and increment it by the agein the found items loop.[math show=F]agevar=[agevar]+[age][/math]-Jason Tylerwww.3ip.net-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
on 8/21/00 10:07 PM, Robert McPeak at robertmcpeak@hotmail.com wrote:> Would one of you whiz kids let me in on how to get a sum total of a> particular field in a founditems set.> > Let's say I've got a db with two fields, name and age. I want to do a> search for all unique names, and then add up all the ages to yield a total> age result.> > Bob 10> Joe 12> Nancy 13> > Total Age: 35> > Help??!If you're using 4.0 you can use the below context.New in 4.0[Sum field=fieldName] Calculates the numerical sum of all thefound records, using the fieldName column.Or create a math var outside the founditems loop and increment it by the agein the found items loop.[math show=F]agevar=[agevar]+[age][/math]-Jason Tylerwww.3ip.net-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Jason Tyler
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:
RE: [WebDNA] tcp connect is slow...any ways to speed it up? (2008)
Hyperboard users wanting a quoted message (1998)
SERIAL NUMBER PROBLEM *AGAIN*!!! (1998)
pc (1997)
Date search - yes or no (1997)
suggestions for a good text editor on windows? (2005)
Problem with shownext (2003)
math on date? (1997)
WebCat2b15MacPlugin - showing [math] (1997)
Is Web Merchant Necessary? (2000)
upgrade? (1997)
syntax question, not in online refernce (1997)
Problems with [Math] (1998)
Sorting by date (1997)
OT - SMSI complaint (2001)
WCS Newbie question (1997)
[WebDNA] feature requests (2008)
WebAuthorize (2001)
PCS Frames (1997)
WebCat2b12--[searchstring] bug (1997)