Re: Saving/Looking Up customer numbers

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16038
interpreted = N
texte = On 2/15/98 4:34 PM, Larry Orchier so noted...>I need to assign each customer a unique customer code. >After they have filled out their information form, I need to find out >the last number assigned, increment it by one, and then place that in >their record in the customer database. > >Is their an example anywhere that I could see?I don't know if this is the most elegant solution, but it's what I used when I had a similar need.I have a customer.db file such as:date user id 1/2/98 bob 1 1/5/98 chuck 2 1/9/98 sally 3 end 4Then, when a new customer is added (with a form passing the value for [userName]), the following is executed:[delete db=customer.db&eqDateData=end] [append db=customer.db]date=[date]&user=[userName]&id=[math]newID[/math][/append] [append db=customer.db]date=end&id=[math]newID +1[/math][/append]Hope this is of some help,Rob Marquardt Designer/Resident Wirehead Toast Design300 First Avenue North, Suite 150 Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com Associated Messages, from the most recent to the oldest:

    
  1. Re: Saving/Looking Up customer numbers (Rob Marquardt 1998)
  2. Re:Saving/Looking Up customer numbers (Jay Van Vark 1998)
  3. Saving/Looking Up customer numbers (Larry Orchier 1998)
On 2/15/98 4:34 PM, Larry Orchier so noted...>I need to assign each customer a unique customer code. >After they have filled out their information form, I need to find out >the last number assigned, increment it by one, and then place that in >their record in the customer database. > >Is their an example anywhere that I could see?I don't know if this is the most elegant solution, but it's what I used when I had a similar need.I have a customer.db file such as:date user id 1/2/98 bob 1 1/5/98 chuck 2 1/9/98 sally 3 end 4Then, when a new customer is added (with a form passing the value for [username]), the following is executed:[delete db=customer.db&eqDateData=end] [append db=customer.db]date=[date]&user=[username]&id=[math]newID[/math][/append] [append db=customer.db]date=end&id=[math]newID +1[/math][/append]Hope this is of some help,Rob Marquardt Designer/Resident Wirehead Toast Design300 First Avenue North, Suite 150 Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com Rob Marquardt

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:

Problem with ShoppingCart.tpl refresh (2000) New 4.5 installer (2002) [INCLUDE] Limitations (1998) [group] ? (1997) unable to launch acgi in WebCat (1997) no country? (1998) SiteGuard Admin Feature ? (1997) Whats going on with my SERIAL NUMBER??? (1998) PIXO (1997) Anomaly ? causes NT application event log to overflow (1997) Doing VALIDCARD right? (1998) RE: Languages (1997) webcat- multiple selection in input field (1997) Reload adding to cart (2001) [WebDNA] preventing hackers from posting their own (altered) version of my form? (2009) Error Lob.db records error message not name (1997) Browser Problem?!? Still getting Error message using (1997) math on date? (1997) Moment of Thanks (1997) [append] vs. [appendfile] delta + question? (1997)