Re: Count how many items in a summ total
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50245
interpreted = N
texte = On 5/12/03 9:03 AM, Nitai @ ComputerOil
wrote:> You bought the product Soap 10 times.> > Meaning I have to go trough the search (which contains also other items then> soap) and count how many times the word soap appears in the db, then only> show the word Soap one time and show how many times it is in the db.Ah yes, sorry...monday morning brain waves...So instead you have the following concept.I bought soap, towels and tissues from, lets say, 100 possible products.I bought soap 10 times, towels 2 and tissues 45 (I have allergies).When you search on my identity and summ on each item you getSoapTowelsTissuesBut you wantSoap 10Towels 2Tissues 10Well, you have some options. If you were starting from an incomplete systemI would recommend storing quantity with each item/purchase. That way youdon't have to go down the road of recursive searching to get totals.I actually had the exact same thing with a discussion forum. My replies wereassociated to the original posts via a related record. However to get atotal number of replies for each 'thread' I had to search on the originalpost and then recursive search on all the replies for that thread to returna [numfound]. Of course once this got really large the system bogged way waydown. Finally I had to go back and rewrite so that each time a reply was posted Iincremented a reply-count field in the original past record. No morerecursive search and it acted like WebDNA again instead of ASP (speed wise)If you cant go back and store quantities per item/per user then you willneed to do the recursive search. The good news is that since it is unlikelythat any one person is going to buy thousands of items, the redundant searchwill probably only be 3-10 searches and as such probably wont give you anyspeed issues.So:[search & SUMM] [founditems] [search on ID and ITEM][numfound][/search] [/founditems][/search]HTH AlexAlex J McCombie New World MediaChief Information Officer Drawer 607888/892.6379 Fair Haven, NY 13064Alex@NewWorldMedia.com http://OurClients.comInterface Designer WebDNA Programmer Database Designer-------------------------------------------------------------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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
On 5/12/03 9:03 AM, Nitai @ ComputerOil wrote:> You bought the product Soap 10 times.> > Meaning I have to go trough the search (which contains also other items then> soap) and count how many times the word soap appears in the db, then only> show the word Soap one time and show how many times it is in the db.Ah yes, sorry...monday morning brain waves...So instead you have the following concept.I bought soap, towels and tissues from, lets say, 100 possible products.I bought soap 10 times, towels 2 and tissues 45 (I have allergies).When you search on my identity and summ on each item you getSoapTowelsTissuesBut you wantSoap 10Towels 2Tissues 10Well, you have some options. If you were starting from an incomplete systemI would recommend storing quantity with each item/purchase. That way youdon't have to go down the road of recursive searching to get totals.I actually had the exact same thing with a discussion forum. My replies wereassociated to the original posts via a related record. However to get atotal number of replies for each 'thread' I had to search on the originalpost and then recursive search on all the replies for that thread to returna [numfound]. Of course once this got really large the system bogged way waydown. Finally I had to go back and rewrite so that each time a reply was posted Iincremented a reply-count field in the original past record. No morerecursive search and it acted like WebDNA again instead of ASP (speed wise)If you cant go back and store quantities per item/per user then you willneed to do the recursive search. The good news is that since it is unlikelythat any one person is going to buy thousands of items, the redundant searchwill probably only be 3-10 searches and as such probably wont give you anyspeed issues.So:[search & SUMM] [founditems] [search on ID and ITEM][numfound][/search] [/founditems][/search]HTH AlexAlex J McCombie New World MediaChief Information Officer Drawer 607888/892.6379 Fair Haven, NY 13064Alex@NewWorldMedia.com http://OurClients.comInterface Designer WebDNA Programmer Database Designer-------------------------------------------------------------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://webdna.smithmicro.com/
Alex McCombie
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: Credit card processing - UK (1997)
WebCatalog can't find database (1997)
cart (1997)
Intermitent problem using [referrer] (1997)
Random letter and/or number (2001)
taxTotal, grandTotal (1997)
Further tests with the infamous shipCost (1997)
Calendar Program (2004)
WC1.6 to WC2 date formatting (1997)
Entry pages (was: WebCatalog MAJOR drawback) (1998)
More than one db with the same namn (was: WC2f3) (1997)
looping table rows (1999)
Associative lookup style? + bit more (1997)
How to Display text in empty fields (1997)
quick [middle] Q (2000)
syntax question, not in online refernce (1997)
Newbie search question (between two dates) (2001)
Multiple 'Users.db' files not possible (1997)
[OT] Flash & WebDNA (2003)
Share cost of training videos! (1998)