Re: Sorting problem
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 41420
interpreted = N
texte = >In order to get the TDC.db search to sort all items you're trying to >list, you've got to find all the items with only one call to the >[search] context. Instead of nesting your searches, first search the >PrinterDB.db and build a list of all the cartridges you want into a >text variable, then search the TDC.db matching all cartridges in the >list. Something like this:>>[text]cartList=[/text][!]intialize list to be empty[/!]>[search >db=TDC_Databases/PrinterDB.db&eqModeldata=[Model]&eqCARTRIDGESdata=[CARTRIDGES]][foundItems]>[text]cartList=[cartList]+[CARTRIDGES][/text]>[/founditems]>[/search]>>[search >db=TDC_Databases/TDC.db&woManufacturePartNumberdata=[cartList]&ManufacturerPartNumberword=ww&allhit=1&asSORTORDERsort=1&max=20&startat=[url][startat][/url]]>[foundItems]>[sortorder] [title]
>[/foundItems]>[/search]
This is the best way to perform searches that used to require nesting (which was a long time ago, before the text context was introduced -- but even then you could create 'text' variables to be used in include files, and therefore avoid nested searches by putting your second search inside the include file).Nested searches are slower and more resource-consuming than consecutive searches, and they are harder to review and debug when looking at the code.Thanks Brian for the great example!:)Sincerely,Kenneth Grome---------------------------------------------------WebDNA Professional Training and Development Center175 J. Llorente Street +63 (32) 255-6921Cebu City, Cebu 6000 kengrome@webdna.netPhilippines http://www.webdna.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:
>In order to get the TDC.db search to sort all items you're trying to >list, you've got to find all the items with only one call to the >[search] context. Instead of nesting your searches, first search the >PrinterDB.db and build a list of all the cartridges you want into a >text variable, then search the TDC.db matching all cartridges in the >list. Something like this:>>[text]cartList=[/text][!]intialize list to be empty[/!]>[search >db=TDC_Databases/PrinterDB.db&eqModeldata=[Model]&eqCARTRIDGESdata=[CARTRIDGES]][founditems]>[text]cartList=[cartList]+[CARTRIDGES][/text]>[/founditems]>[/search]>>[search >db=TDC_Databases/TDC.db&woManufacturePartNumberdata=[cartList]&ManufacturerPartNumberword=ww&allhit=1&asSORTORDERsort=1&max=20&startat=[url][startat][/url]]>[founditems]>[sortorder] [title]
>[/foundItems]>[/search]
This is the best way to perform searches that used to require nesting (which was a long time ago, before the text context was introduced -- but even then you could create 'text' variables to be used in include files, and therefore avoid nested searches by putting your second search inside the include file).Nested searches are slower and more resource-consuming than consecutive searches, and they are harder to review and debug when looking at the code.Thanks Brian for the great example!:)Sincerely,Kenneth Grome---------------------------------------------------WebDNA Professional Training and Development Center175 J. Llorente Street +63 (32) 255-6921Cebu City, Cebu 6000 kengrome@webdna.netPhilippines http://www.webdna.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/
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:
BBEdit/HTMLcomments/WebCat/[/FONT] (1999)
RE: [WebDNA] ubuntu can't append db (2019)
Robert Minor duplicate mail (1997)
NT Setup (1998)
webCatalog and Stocks (1998)
Smart caching problems with 2.1b3? (1997)
Shipping formula problem (1997)
Viewing old carts (was FEW QUESTIONS) (1997)
Just Testing (1997)
WC2b15 File Corruption (1997)
Test (2001)
Not really WebCat- (1997)
[WriteFile] problems (1997)
Email within tmpl ? (1997)
[Announce] Newest Commerce Site based on WebCatalog (1997)
WCS Newbie question (1997)
Include vs. lookup? (1998)
Problems passing [SKU] with $Replace in 2.0 (1997)
Bug or syntax error on my part? (1997)
Using [Showif] tag. Mac (1997)