Re: setting line item numbers

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16024
interpreted = N
texte = >>Use the [cart] tag, it always creates a unique number the first time it's >used on a page -- provided you haven't passed a [cart] value from the >preceeding page ... >> >>[search db=../myuser.db&geZIPdatarq=0] >>[founditems] >>[replace >db=../myuser.db&eqDATEdatarq=[date]&eqZIPdatarq=[zip]]sku=[cart][/replace] >>[/founditems] >>[/search] > >My mistake, I wasn't clear enough in the original post. >I need to take a database, and by performing some search/replace >combination adding the index value to the record in a line by line >manner.Okay I think this is what you need:[search db=../myuser.db&geZIPdatarq=0] [founditems] [replace db=../myuser.db&eqDATEdatarq=[date]&eqZIPdatarq=[zip]]sku=[cart][index][/replace] [/founditems] [/search]This will find all the records with a number that's greater than or equal to zero in the zip field, then out of those records, it will put a new unique sku value into the records having today's date in the date field.Each record found and replaced will have a different sku because the index is appended to the end of the [cart] value. Since the cart is unique to this page at the time you request it, and the index is different for each founditem, the resulting sku's will all be unique values.Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://webdna.net/ Associated Messages, from the most recent to the oldest:

    
  1. Re: setting line item numbers (Kenneth Grome 1998)
  2. Re: setting line item numbers (Brian B. Burton 1998)
  3. Re: setting line item numbers (Kenneth Grome 1998)
  4. setting line item numbers (Brian B. Burton 1998)
>>Use the [cart] tag, it always creates a unique number the first time it's >used on a page -- provided you haven't passed a [cart] value from the >preceeding page ... >> >>[search db=../myuser.db&geZIPdatarq=0] >>[founditems] >>[replace >db=../myuser.db&eqDATEdatarq=[date]&eqZIPdatarq=[zip]]sku=[cart][/replace] >>[/founditems] >>[/search] > >My mistake, I wasn't clear enough in the original post. >I need to take a database, and by performing some search/replace >combination adding the index value to the record in a line by line >manner.Okay I think this is what you need:[search db=../myuser.db&geZIPdatarq=0] [founditems] [replace db=../myuser.db&eqDATEdatarq=[date]&eqZIPdatarq=[zip]]sku=[cart][index][/replace] [/founditems] [/search]This will find all the records with a number that's greater than or equal to zero in the zip field, then out of those records, it will put a new unique sku value into the records having today's date in the date field.Each record found and replaced will have a different sku because the index is appended to the end of the [cart] value. Since the cart is unique to this page at the time you request it, and the index is different for each founditem, the resulting sku's will all be unique values.Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://webdna.net/ Kenneth Grome

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:

3RD POST Character limit in [Search]? (1998) [WebDNA] Generating Excel File Via WebDNA (2010) Sum of Quantities (1997) Multiple Pulldowns (1997) MySQL (2003) Associative lookup style? (1997) Multiple prices (1997) [isfile] ? (1997) Nav. 4 probs with cart - Serious problem (1997) Java Path (2004) Banners (1997) [ShowNext] (1997) Quit revisited (1997) summ=T (2003) Sort Order on a page search (1997) Nebulous slow-down problem (2000) Middle problem (2005) WebCat2b13 Command Reference Doc error (1997) Expiration of Carts (1997) price formula (1999)