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:
Search Context Strips URL chrs.? (1999)
[carts] and databases (1997)
any limitations on # of users.db entries (1999)
More on IE5 (2000)
Bulletin Board.... (2000)
Cart Creation (2003)
Sendmail doesn't (was Queertrons?) (1997)
PROBLEMS WITH WEBCAT LINUX (2000)
Emailer setup (1997)
WC2.0 Memory Requirements (1997)
Shopping Carts (2000)
how to use WebCat w. SSL & CyberCash (1998)
Migrating to NT (1997)
oops private message leaked into talk list (1997)
problems with 2 tags shakur (1997)
FW: ANother SHOWIF problem (1997)
Webmerchant confirmation hooks? (1997)
Date Calulation (1997)
Text data with spaces in them... (1997)
Error Log.db --however (1997)