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:
Explorer 3.0/ Access Denied! (1997)
Using Applescript to process WebCatalog functions (1998)
Link in a text (2000)
Webcat no longer supported? (2006)
Nebulous slow-down problem (2000)
(2000)
Need help with emailer- 2 issues (1997)
How to Sort Summ data ? (1997)
[UPPERCASE] (1997)
Error: Too many nested [xxx] contexts (1997)
Re:Has this happened to you? (was:Emailer Chokes on bad address) (1997)
[OT] Mozilla | Was: R.I.P. Netscape (2003)
[OT] Death Clock (2003)
WebCatalog2 Feature Feedback (1996)
Orderfile Question (2003)
Image upload (2000)
Add to Cart & List of Products (1997)
What week is first? (1998)
Search in 2 or more catalogs (1997)
Ok here is a question? (1997)