Re: Replacing entry

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17954
interpreted = N
texte = Michael Winston typed in relation to substract data from a database. > >Put this before the [purchase] tag:>[ORDERFILE cart=[cart]] >[LINEITEMS] >[REPLACE db=Your.db&eqSKUdatarq=[SKU]]no_of_items=[MATH][LOOKUP >db=your.db&value=[sku]&lookinfield=sku&returnfield=no_of_items]-[QTY][/MATH][/R >E >PLACE] >[/LINEITEMS] >[/ORDERFILE] >hmmm, what if the purchase action is passed via a form button? Do I pass all the items below with the form?>This will subtract the quantity purchased from the database, but it *won't* >prevent overselling a product. If PersonA puts 10 of something in their >cart, and PersonB puts 5 of that same item in their cart before PersonA >concludes his purchase, your no_of_items field will equal -5 when PersonB >makes his purchase. >If you want to prevent overselling an item, you're opening upo a whole new >can of worms. It's pretty complicated, but I will post an example if >that's what you're after. > Yes thank you, you can E-Mail me direct if you wish. Many thanks, Regards, **************************************************************** Micheal O Se www.compulive.com Internet Hosting Service micheal@compulive.com Database powered websites **************************************************************** Associated Messages, from the most recent to the oldest:

    
  1. Re: Replacing entry (Jona Kamsteeg 1998)
  2. Re: Replacing entry (Mícheál O Sé 1998)
  3. Re: Replacing entry (Michael Winston 1998)
  4. Re: Replacing entry (Kenneth Grome 1998)
  5. Replacing entry (Mícheál O Sé 1998)
Michael Winston typed in relation to substract data from a database. > >Put this before the [purchase] tag:>[ORDERFILE cart=[cart]] >[lineitems] >[REPLACE db=Your.db&eqSKUdatarq=[SKU]]no_of_items=[math][LOOKUP >db=your.db&value=[sku]&lookinfield=sku&returnfield=no_of_items]-[QTY][/MATH][/R >E >PLACE] >[/LINEITEMS] >[/ORDERFILE] >hmmm, what if the purchase action is passed via a form button? Do I pass all the items below with the form?>This will subtract the quantity purchased from the database, but it *won't* >prevent overselling a product. If PersonA puts 10 of something in their >cart, and PersonB puts 5 of that same item in their cart before PersonA >concludes his purchase, your no_of_items field will equal -5 when PersonB >makes his purchase. >If you want to prevent overselling an item, you're opening upo a whole new >can of worms. It's pretty complicated, but I will post an example if >that's what you're after. > Yes thank you, you can E-Mail me direct if you wish. Many thanks, Regards, **************************************************************** Micheal O Se www.compulive.com Internet Hosting Service micheal@compulive.com Database powered websites **************************************************************** Mícheál O Sé

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:

ImageMap (1997) Tuition - UK (2000) Format of Required fields error message (1997) RE: Adding headers to email (1997) Nesting format tags (1997) California Tax Rates (1998) Arrays (2000) Colors in cart (2002) customizing the color of user's pages (1997) WebCat2b13MacPlugIn - [include] (1997) Mac: LModelDirector bug fix (1997) [WebDNA] Help with work-around format date (2013) Snake Bites (1997) sendmail and CGatePro (2003) Round up prices (2000) stumped on simple sort (1999) form data submission gets truncated (1997) [Announce] Newest Commerce Site based on WebCatalog (1997) ups quickcost [repost] (1999) WebCat for Unix?? (1997)