Re: No Wanna Duppys

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 21012
interpreted = N
texte = At 11:40 Uhr -0800 13.11.1998, The Mooseman wrote:>I want to add a snip that looks at the catalog.db and sees if there is >a matching sku number before it writes a duplicate sku to the db. > >Am I correct that a [showif] should handle it on the called eg:results page? >I can't recall how to search for it first... with a lookup or a search.... >no success with either! Lookup is faster than search:[showif [lookup db=catalog.db&value=[NewSku]&lookinfield=sku&returnfield=sku¬found=ok]=ok] [m ath show=f]v_add=1[/math] [/showif][showif [math]v_add[/math]=1] (add the item...) [/showif] [hideif [math]v_add[/math]=1] (this is a dup, don't add the item or use a different SKU...) [/hideif]You can do a second lookup within a hideif-tag instead of setting a variable, but doing just one lookup is supposed to be faster. Peter++++++++++++++++++++++++++++++++++++++++++++++++ Peter Ostry - Vienna/Austria - www.ostry.com Fon ++43-1-877 74 54 Fax ++43-1-877 74 54-21 ++++++++++++++++++++++++++++++++++++++++++++++++ Associated Messages, from the most recent to the oldest:

    
  1. Re: No Wanna Duppys (Peter Ostry 1998)
  2. Re: No Wanna Duppys (The Mooseman 1998)
  3. Re: No Wanna Duppys (Peter Ostry 1998)
  4. Re: No Wanna Duppys (Kenneth Grome 1998)
  5. Re: No Wanna Duppys (The Mooseman 1998)
  6. Re: No Wanna Duppys (The Mooseman 1998)
  7. Re: No Wanna Duppys (Peter Ostry 1998)
  8. No Wanna Duppys (The Mooseman 1998)
At 11:40 Uhr -0800 13.11.1998, The Mooseman wrote:>I want to add a snip that looks at the catalog.db and sees if there is >a matching sku number before it writes a duplicate sku to the db. > >Am I correct that a [showif] should handle it on the called eg:results page? >I can't recall how to search for it first... with a lookup or a search.... >no success with either! Lookup is faster than search:[showif [lookup db=catalog.db&value=[NewSku]&lookinfield=sku&returnfield=sku¬found=ok]=ok] [m ath show=f]v_add=1[/math] [/showif][showif [math]v_add[/math]=1] (add the item...) [/showif] [hideif [math]v_add[/math]=1] (this is a dup, don't add the item or use a different SKU...) [/hideif]You can do a second lookup within a hideif-tag instead of setting a variable, but doing just one lookup is supposed to be faster. Peter++++++++++++++++++++++++++++++++++++++++++++++++ Peter Ostry - Vienna/Austria - www.ostry.com Fon ++43-1-877 74 54 Fax ++43-1-877 74 54-21 ++++++++++++++++++++++++++++++++++++++++++++++++ Peter Ostry

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:

Replace Statement (1997) charge.com (2005) [WebDNA] 6.2 Monitor (2012) Multiple Selections in Pull-Down Menu (2000) Help! WebCat2 bug (1997) Printing controls - form feeds (2002) I'm new be kind (1997) need some help with a loop (1999) Less than or equal to........ (1997) Multiple instances of database (2003) Associative lookup style? + bit more (1997) AAgghh!! Help, please. SSL strikes again. (1997) RE: 2nd WebCatalog2 Feature Request (1996) RE: Formulas.db + Users.db (1997) Searching using numbers (1998) Multiple cart additions (1997) QuitFeedback & DBNotOpened errors (1997) Strange intermittent WebDNA problems (2008) Configuring E-mail (1997) Grouping search fields, etc. (1997)