Re: [WebDNA] Conditional search

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103065
interpreted = N
texte = Not directly related (and won't solve your issue), but IIRC [/search] isn= 't really needed to=20 "close" a [search], it's just better syntax (to me), and a habit I got in= to early. -Dan On Thu, 30 Jul 2009 17:38:49 -0400 Terry Wilson wrote: > You can't hop-scotch through opening and closing tags; nest things prop= erly. The first search is=20 >done the moment it finds 0 records, so you don't have to put the closing= tag before doing the=20 >second search. Nest everything it will be fine: >=20 > [search db=3D^db/products.db&group1field=3DSKU&waGROUP1datarq=3D[url][s= rch][/url]] > [showif [numfound]=3D0] > [search=20 > db=3D^db/products.db&group1field=3DSKU&woGROUP1datarq=3D[url][srch][/ur= l]] >  stuff found in the second search > [/search] > [/showif] > [/search] >=20 > Terry >=20 >=20 > If numfound =3D 0 on the first search, I expect it to close that search= and start a new search: >=20 > [search db=3D^db/products.db&group1field=3DSKU&waGROUP1datarq=3D[url][s= rch][/url]] > [showif [numfound]=3D0] > [/search] > [search=20 > db=3D^db/products.db&group1field=3DSKU&woGROUP1datarq=3D[url][srch][/ur= l]] > [/showif] >=20 > However, this is not working properly. Instead of closing the search wi= th [/search], it just=20 >displays [/search] and [/showif] as text. >=20 > Any ideas? >=20 > ----------- > Ki Song >=20 >=20 > --=20 > Terry Wilson | terry@terryfic.com | http://terryfic.com > http://WhosComing.com - a simplified, affordable online reservation sys= tem > http://TightJacket.com -- stylish protection for your laptop > -----------------------------------------------------------------------= --- > Attitude is the only difference between ordeal and adventure. > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Conditional search ("Terry Wilson" 2009)
  2. Re: [WebDNA] Conditional search (Frank Nordberg 2009)
  3. Re: [WebDNA] Conditional search ("Terry Wilson" 2009)
  4. Re: [WebDNA] Conditional search (Frank Nordberg 2009)
  5. Re: [WebDNA] Conditional search (Brian Fries 2009)
  6. Re: [WebDNA] Conditional search ("Dan Strong" 2009)
  7. Re: [WebDNA] Conditional search (Terry Wilson 2009)
  8. Re: [WebDNA] Conditional search (Tom Duke 2009)
  9. [WebDNA] Conditional search ("Ki Song - Knifecenter.com" 2009)
Not directly related (and won't solve your issue), but IIRC [/search] isn= 't really needed to=20 "close" a [search], it's just better syntax (to me), and a habit I got in= to early. -Dan On Thu, 30 Jul 2009 17:38:49 -0400 Terry Wilson wrote: > You can't hop-scotch through opening and closing tags; nest things prop= erly. The first search is=20 >done the moment it finds 0 records, so you don't have to put the closing= tag before doing the=20 >second search. Nest everything it will be fine: >=20 > [search db=3D^db/products.db&group1field=3DSKU&waGROUP1datarq=3D[url][s= rch][/url]] > [showif [numfound]=3D0] > [search=20 > db=3D^db/products.db&group1field=3DSKU&woGROUP1datarq=3D[url][srch][/ur= l]] >  stuff found in the second search > [/search] > [/showif] > [/search] >=20 > Terry >=20 >=20 > If numfound =3D 0 on the first search, I expect it to close that search= and start a new search: >=20 > [search db=3D^db/products.db&group1field=3DSKU&waGROUP1datarq=3D[url][s= rch][/url]] > [showif [numfound]=3D0] > [/search] > [search=20 > db=3D^db/products.db&group1field=3DSKU&woGROUP1datarq=3D[url][srch][/ur= l]] > [/showif] >=20 > However, this is not working properly. Instead of closing the search wi= th [/search], it just=20 >displays [/search] and [/showif] as text. >=20 > Any ideas? >=20 > ----------- > Ki Song >=20 >=20 > --=20 > Terry Wilson | terry@terryfic.com | http://terryfic.com > http://WhosComing.com - a simplified, affordable online reservation sys= tem > http://TightJacket.com -- stylish protection for your laptop > -----------------------------------------------------------------------= --- > Attitude is the only difference between ordeal and adventure. > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ "Dan Strong"

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:

Occasional crashes with $remove (1997) Re:no [search] with NT (1997) Summing fields (1997) Here's how to kill a Butler Database. (1997) Quicky Date thing (2005) Digest for 4/18/97 (1997) test mail (2004) denied access (1997) aaron kant add (2.x) (2000) Date sorting (1997) [WebDNA] Pretty URLS (2011) NT Version on IIS 4.0 (1997) searching illegal HTML (2002) Mozilla/4. and Browser Info.txt (1997) [WebDNA] Downloadable file protection (2011) tricky embedded[showifs/hideifs] (w/ code.. long) (2000) Grep to convert characters to html entities (2006) Help! WebCat2 bug (1997) Resume Catalog ? (1997) searchable list archive (1997)