Re: Sorting a summary

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 34140
interpreted = N
texte = I think you've got to build a temporary database and then sort that db on the count. Create an empty database named temp.db with two fields, TEMPSTATE and TEMPNUM. Then code your template something like this: [!] This deletes all the records from the previous hit of the database [/!] [delete db=temp.db&neTEMPSTATEdata=__all__][search db=dbs/custinfo.db&geSTATEdata=0&STATEsumm=T] [founditems] [search db=dbs/custinfo.db&eqSTATEdatarq=[STATE]&max=1] [founditems] [append db=temp.db]TEMPSTATE=[STATE]&TEMPNUM=[numfound][/append] [/founditems] [/search][/founditems] [/search][search db=temp.db&neTEMPSTATEdata=__all__&deTEMPNUMsort=1&TEMPNUMtype=num] [founditems] [TEMPSTATE] [TEMPNUM] [/founditems] [/search] One warning... if there is a possibility that more then one visitor will be hitting this template at the same time, then you need to create the temp database on the fly and use the [cart] variable in the name of the temp database to make it unique.___Joe___ _________________________________________________ Joseph D'Andrea JoeDan@West21.com WEST21.com Internet services for the 21st Century http://www.west21.com/ _________________________________________________ ------------------------------------------------------------- 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:

    
  1. Re: Sorting a summary (Joseph D'Andrea 2000)
  2. Sorting a summary (Jeff Grady 2000)
I think you've got to build a temporary database and then sort that db on the count. Create an empty database named temp.db with two fields, TEMPSTATE and TEMPNUM. Then code your template something like this: [!] This deletes all the records from the previous hit of the database [/!] [delete db=temp.db&neTEMPSTATEdata=__all__][search db=dbs/custinfo.db&geSTATEdata=0&STATEsumm=T] [founditems] [search db=dbs/custinfo.db&eqSTATEdatarq=[STATE]&max=1] [founditems] [append db=temp.db]TEMPSTATE=[STATE]&TEMPNUM=[numfound][/append] [/founditems] [/search][/founditems] [/search][search db=temp.db&neTEMPSTATEdata=__all__&deTEMPNUMsort=1&TEMPNUMtype=num] [founditems] [TEMPSTATE] [TEMPNUM] [/founditems] [/search] One warning... if there is a possibility that more then one visitor will be hitting this template at the same time, then you need to create the temp database on the fly and use the [cart] variable in the name of the temp database to make it unique.___Joe___ _________________________________________________ Joseph D'Andrea JoeDan@West21.com WEST21.com Internet services for the 21st Century http://www.west21.com/ _________________________________________________ ------------------------------------------------------------- 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/ Joseph D'Andrea

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:

C is for cookie - that's good enough for me... (2001) RePost: NAT and the CART (1999) GuestBook example (1997) problems with 2 tags (1997) WebCat2b15MacPlugin - [protect] (1997) WebCat2b15MacPlugin - [protect] (1997) Sorting problem (1997) WebCatalog NT beta 18 problem (1997) Re1000001: Setting up shop (1997) orderfile and setlineitems (1998) Dumb Question about Docs (1997) [WebDNA] ErrorLog.txt generated by WebDNA (2010) ThreadMem ignored? (1998) Not reading code (1997) [append] and SSL (1997) Show first couple of lines. (2003) easiest way to check for a non-alphanumeric character? (2000) WebCat2b13 Command Reference Doc error (1997) hyperlinking unique input strings on the fly when displaying in HTML (2000) [OT] Cold Fusion snippet [found]. (2002)