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 get Soap Towels TissuesBut you want Soap 10 Towels 2 Tissues 10Well, you have some options. If you were starting from an incomplete system I would recommend storing quantity with each item/purchase. That way you don'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 were associated to the original posts via a related record. However to get a total number of replies for each 'thread' I had to search on the original post and then recursive search on all the replies for that thread to return a [numfound]. Of course once this got really large the system bogged way way down. Finally I had to go back and rewrite so that each time a reply was posted I incremented a reply-count field in the original past record. No more recursive 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 will need to do the recursive search. The good news is that since it is unlikely that any one person is going to buy thousands of items, the redundant search will probably only be 3-10 searches and as such probably wont give you any speed issues.So: [search & SUMM] [founditems] [search on ID and ITEM][numfound][/search] [/founditems] [/search] HTH Alex Alex J McCombie New World Media Chief Information Officer Drawer 607 888/892.6379 Fair Haven, NY 13064 Alex@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:

    
  1. Re: Count how many items in a summ total (Laurent Bache 2003)
  2. Re: Count how many items in a summ total (Alex McCombie 2003)
  3. Re: Count how many items in a summ total (Nitai @ ComputerOil 2003)
  4. Re: Count how many items in a summ total (Alex McCombie 2003)
  5. Count how many items in a summ total (Nitai @ ComputerOil 2003)
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 get Soap Towels TissuesBut you want Soap 10 Towels 2 Tissues 10Well, you have some options. If you were starting from an incomplete system I would recommend storing quantity with each item/purchase. That way you don'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 were associated to the original posts via a related record. However to get a total number of replies for each 'thread' I had to search on the original post and then recursive search on all the replies for that thread to return a [numfound]. Of course once this got really large the system bogged way way down. Finally I had to go back and rewrite so that each time a reply was posted I incremented a reply-count field in the original past record. No more recursive 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 will need to do the recursive search. The good news is that since it is unlikely that any one person is going to buy thousands of items, the redundant search will probably only be 3-10 searches and as such probably wont give you any speed issues.So: [search & SUMM] [founditems] [search on ID and ITEM][numfound][/search] [/founditems] [/search] HTH Alex Alex J McCombie New World Media Chief Information Officer Drawer 607 888/892.6379 Fair Haven, NY 13064 Alex@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)