Re: SKU lookup

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13116
interpreted = N
texte = Hey guys, thanks for the help, I'll try those out and see what I come up with!Kenneth Grome wrote: > > >Heh Dan: > > > >I like your post! How about this hack which I think will work. > > > > > > > >[search db=yourdatabase.db&grskudata=0&deskusort=1&max=1] > > [founditems] > > [math]newsku=[sku]+1[/math] > > [/founditems] > >[/search] > > > >

Final value=[math]newsku[/math]

> > > > > > > >This will sort in decending order, find only 1 (so the highest number) > >and then assign it to newsku plus one. > > Hey Olin, > > This is exactly what I was going to suggest in the first place! :) > > ... but then I didn't know if Damien really needed incremented sku > values or not, so I thought I would show him the [cart] technique > first, since it's the easiest and fastest to code. > > But hey, if the goal is to append records with each new record's sku > value incremented one higher than the highest existing sku in the > database, your code above can be modified just a little, and then > integrated into an append context as follows: > > [append db=yourdatabase.db]sku=[search > db=yourdatabase.db&grskudata=0&deskusort=1&max=1][founditems][math][sku]+1[/math > ][/founditems][/search] > > Sincerely, Ken Grome > WebDNA Solutions > http://www.hui.net/dna/webdna.html-- _ __( )_ While Eeyore frets ... ( (o____ and Piglet hesitates ... | | and Rabbit calculates ... | (__/ and Owl pontificates \ / ___ / \ \___/ / ^ / \ ...Pooh just is. | | |__|_HUNNY | | \______)____/ \ / \ /_ Damien Joldersma | ( __) p00h@wcug.wwu.edu (____) http://www.wcug.wwu.edu/~p00h Associated Messages, from the most recent to the oldest:

    
  1. Re: SKU lookup (Damien Joldersma 1997)
  2. Re: SKU lookup (Kenneth Grome 1997)
  3. Re: SKU lookup (Olin 1997)
  4. Re: SKU lookup (Kenneth Grome 1997)
  5. Re: SKU lookup (Daniel Cameron 1997)
  6. Re: SKU lookup (Damien Joldersma 1997)
  7. Re: SKU lookup (Kenneth Grome 1997)
  8. SKU lookup (Damien Joldersma 1997)
Hey guys, thanks for the help, I'll try those out and see what I come up with!Kenneth Grome wrote: > > >Heh Dan: > > > >I like your post! How about this hack which I think will work. > > > > > > > >[search db=yourdatabase.db&grskudata=0&deskusort=1&max=1] > > [founditems] > > [math]newsku=[sku]+1[/math] > > [/founditems] > >[/search] > > > >

Final value=[math]newsku[/math]

> > > > > > > >This will sort in decending order, find only 1 (so the highest number) > >and then assign it to newsku plus one. > > Hey Olin, > > This is exactly what I was going to suggest in the first place! :) > > ... but then I didn't know if Damien really needed incremented sku > values or not, so I thought I would show him the [cart] technique > first, since it's the easiest and fastest to code. > > But hey, if the goal is to append records with each new record's sku > value incremented one higher than the highest existing sku in the > database, your code above can be modified just a little, and then > integrated into an append context as follows: > > [append db=yourdatabase.db]sku=[search > db=yourdatabase.db&grskudata=0&deskusort=1&max=1][founditems][math][sku]+1[/math > ][/founditems][/search] > > Sincerely, Ken Grome > WebDNA Solutions > http://www.hui.net/dna/webdna.html-- _ __( )_ While Eeyore frets ... ( (o____ and Piglet hesitates ... | | and Rabbit calculates ... | (__/ and Owl pontificates \ / ___ / \ \___/ / ^ / \ ...Pooh just is. | | |__|_HUNNY | | \______)____/ \ / \ /_ Damien Joldersma | ( __) p00h@wcug.wwu.edu (____) http://www.wcug.wwu.edu/~p00h Damien Joldersma

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:

shipCost -vs- shippingtotal ? (2000) Smart caching problems with 2.1b3? (1997) Exclamation point (1997) PIXO support (1997) BUG ? Running on Empty (1999) Error Log.db --however (1997) OK, here's a new one (2002) [Fwd: Rotating Banners ... (was LinkExchange)] (1997) [/application] error? (1997) Strange database format import (2000) [WebDNA] IIS 6.1 Win 7 (2013) [WebDNA] Bug in build/version number (2012) WebCat2.0b15-to many nested [xx] tags (1997) TeaRoom (2000) Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997) Relay link (2002) Why does WebCat do this? (2001) webcat error log (1998) WC Database Format (1997) WebCatalog and directory indexing (1998)