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:

WebCatalog for guestbook ? (1997) That Flakey 'Brawl' thing (1997) WebCatalog vs. Cold Fusion (1998) HomePage Caution (1997) [HIDEIF] inside [FOUNDITEM] (1997) [WebDNA] How to grep a | (2011) form data submission gets truncated (1997) WebCatalog for Postcards ? (1997) [OT] Little Flash help (2007) Using [showif] within [lineitems] [code fragment] (2000) WebCat & cookies (1998) back button loses cart (2000) Rumpus/Typhoon modules included in Typhoon ... (1997) Practice runs ? (1997) Unix webcat perms & multiple versions of same db in cacheissue (2000) Separate SSL Server (1997) WebCat2: multiple currency support (1997) WCS Newbie question (1997) Pay Flow Pro Mac OS9 (2002) Check boxes (1997)