Re: Problem searching bw & ne of a word

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23979
interpreted = N
texte = >sku >keych >keych001 >keych002 > >For [p]=keych I want to find all instances where the sku begins with >keych but is *not* literally keych (ie. just the sku's with a numeric >suffix). > >I thought it would be easy enough by using > >[search db=product.db&bwSkuDataRq=[p]&neSkuDataRq=[p]] > >but that finds nothing.The reason that it finds nothing is that you are doing two searches on the same field. Web Cat does not like that, but there is a trick that you can use to fool it into doing the search. The way to solve this problem is to create Groupfields. You will need two of them for the search to work properly. I tested this code using your sample database above and it seemed to work.[search db=key.db&group2field=sku&bwgroup2datarq=[p]&group1field=sku&negroup1datarq=[p]] [founditems] [sku] [/founditems] [/search]What you are diong is creating two fields of Skus and searching them seperately. John Jakovich/Support Assistant | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Problem searching bw & ne of a word (Kenneth Grome 1999)
  2. Re: Problem searching bw & ne of a word (Rob Marquardt 1999)
  3. Re: Problem searching bw & ne of a word (Kenneth Grome 1999)
  4. Re: Problem searching bw & ne of a word (John Jakovich 1999)
  5. Problem searching bw & ne of a word (Rob Marquardt 1999)
>sku >keych >keych001 >keych002 > >For [p]=keych I want to find all instances where the sku begins with >keych but is *not* literally keych (ie. just the sku's with a numeric >suffix). > >I thought it would be easy enough by using > >[search db=product.db&bwSkuDataRq=[p]&neSkuDataRq=[p]] > >but that finds nothing.The reason that it finds nothing is that you are doing two searches on the same field. Web Cat does not like that, but there is a trick that you can use to fool it into doing the search. The way to solve this problem is to create Groupfields. You will need two of them for the search to work properly. I tested this code using your sample database above and it seemed to work.[search db=key.db&group2field=sku&bwgroup2datarq=[p]&group1field=sku&negroup1datarq=[p]] [founditems] [sku] [/founditems] [/search]What you are diong is creating two fields of Skus and searching them seperately. John Jakovich/Support Assistant | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ John Jakovich

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:

[SearchString] problem with [search] context (1997) Attention SMSI - DOCS Error (2004) Changes to the List (1997) Cart # Starting at 1000 (2000) Email template names (1997) Extended [ConvertChars] (1997) Monthly Help File (1999) Error (1997) Limit on nested [ShowIf]'s? (1997) The beginning (1997) international time (1997) Need Sample Template - just purchased (1997) Netscape for MacOS X (2001) Trouble with formula.db (1997) Password problems with WebCat 4.01 (2000) Sorting nested search (2003) [SMSI] WebDNA is too good to go away! (2006) Limitations on fields? Server is crashing (1997) error -108 (1997) More questions about serial number dishing (1997)