Re: [WebDNA] Conditional search
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103064
interpreted = N
texte = You can't hop-scotch through opening and closing tags; nest things properly. The first search is done the moment it finds 0 records, so you don't have to put the closing tag before doing the second search. Nest everything it will be fine:[search db=^db/products.db&group1field=SKU&waGROUP1datarq=[url][srch][/url]][showif [numfound]=0] [search db=^db/products.db&group1field=SKU&woGROUP1datarq=[url][srch][/url]] stuff found in the second search [/search][/showif][/search]TerryIf numfound = 0 on the first search, I expect it to close that search and start a new search:[search db=^db/products.db&group1field=SKU&waGROUP1datarq=[url][srch][/url]][showif [numfound]=0] [/search] [search db=^db/products.db&group1field=SKU&woGROUP1datarq=[url][srch][/url]][/showif]However, this is not working properly. Instead of closing the search with [/search], it just displays [/search] and [/showif] as text.Any ideas?-----------Ki Song-- Terry Wilson | terry@terryfic.com | http://terryfic.comhttp://WhosComing.com - a simplified, affordable online reservation systemhttp://TightJacket.com -- stylish protection for your laptop--------------------------------------------------------------------------Attitude is the only difference between ordeal and adventure.
Associated Messages, from the most recent to the oldest:
You can't hop-scotch through opening and closing tags; nest things properly. The first search is done the moment it finds 0 records, so you don't have to put the closing tag before doing the second search. Nest everything it will be fine:[search db=^db/products.db&group1field=SKU&waGROUP1datarq=
[url][srch][/url]][showif [numfound]=0] [search db=^db/products.db&group1field=SKU&woGROUP1datarq=
[url][srch][/url]] stuff found in the second search [/search][/showif][/search]TerryIf numfound = 0 on the first search, I expect it to close that search and start a new search:[search db=^db/products.db&group1field=SKU&waGROUP1datarq=
[url][srch][/url]][showif [numfound]=0] [/search] [search db=^db/products.db&group1field=SKU&woGROUP1datarq=
[url][srch][/url]][/showif]However, this is not working properly. Instead of closing the search with [/search], it just displays [/search] and [/showif] as text.Any ideas?-----------Ki Song-- Terry Wilson | terry@terryfic.com | http://terryfic.comhttp://WhosComing.com - a simplified, affordable online reservation systemhttp://TightJacket.com -- stylish protection for your laptop--------------------------------------------------------------------------Attitude is the only difference between ordeal and adventure.
Terry Wilson
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:
WCf2 and nested tags (1997)
Re[2]: 2nd WebCatalog2 Feature Request (1996)
your mail (2000)
pretty Urgent: Crash after addlineitem (2001)
Answer: WebDelivery downloads alias, not original ? (1997)
WebTen and WebCat (1997)
Cookie set browser session. (1998)
WebCatalog for Postcards ? (1997)
Alternating colors (1997)
Wanted: More Math Functions (or, Can You Solve This?) (1997)
Shipping charges depending on tax rate? (1997)
upgrade? (1997)
Document Contains No Data, Blank Pages with b4, b6 mac! (1999)
Wanted: Broader string manipulation functions (1997)
[searchstring] (2000)
Problems appending to database (1997)
NT b19 sends extra MIME headers (1997)
Different coloured rows for [FoundItems] (2000)
Re:Can anyone help me with this shipping thing? (1998)
[WebDNA] Secure Cookies (2020)