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:

Configuring E-mail (1997) Help! WebCat2 bug (1997) Allowed fields in formulas.db (1998) Server Freeze (1998) OT: someone to take over some small customers (2001) Possible Bug in 2.0b15.acgi (1997) Discounts (1998) [ot] iBook vs. 12" PB (2004) Kaaaaahhhhhhhnnnnnnn! (1997) Does summarizing found records require sorting on that samefield? (1999) Need relative path explanation (1997) [WebDNA] Why doesn't this returnraw redirect to the new page? (2009) Searching for all records (1998) math a various prices (1997) Looking up two prices in database? (1997) Re:HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997) slide show (2002) Request Time Out (1997) Upload Text File/ Append to DB (2003) Virtual Domains (1998)