Re: Finding max value for a field

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13368
interpreted = N
texte = >I want to generate a sequential series of ID numbers for database >records (I have to do this separately from the [cart] function). > >Is there an easy way to quickly look up the maximum value in a >particular field for all database records? I can then use [math] to make >the next number. Here, try this:[append db=database.db]particularfield=[search db=database.db&neparticularfielddata=0&desortparticularfield=1&max=1][founditems ][math][particularfield]+1[/math][/founditems][/search][/append]Sincerely, Ken Grome WebDNA Solutions http://www.hui.net/dna/webdna.html Associated Messages, from the most recent to the oldest:

    
  1. Re: Finding max value for a field (Pat McCormick 1997)
  2. Re: Finding max value for a field (Kenneth Grome 1997)
  3. Re: Finding max value for a field (Kenneth Grome 1997)
  4. Re:Finding max value for a field (Jay Van Vark 1997)
  5. Finding max value for a field (Pat McCormick 1997)
>I want to generate a sequential series of ID numbers for database >records (I have to do this separately from the [cart] function). > >Is there an easy way to quickly look up the maximum value in a >particular field for all database records? I can then use [math] to make >the next number. Here, try this:[append db=database.db]particularfield=[search db=database.db&neparticularfielddata=0&desortparticularfield=1&max=1][founditems ][math][particularfield]+1[/math][/founditems][/search][/append]Sincerely, Ken Grome WebDNA Solutions http://www.hui.net/dna/webdna.html 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:

Setting up shop (1997) [WebDNA] get vs post problems (2011) OFF Topic - Web-Stat App (2003) WebCat2 - storing unformatted date data? (1997) WebCatalog can't find database (1997) Order not created error (never mind) (1997) WebCat for mass emailings (1997) too many nested tags ... (1997) sendmail in html format? (2002) What abobut variables named max ??? (2000) Rams SuperBowl Champs (2000) Re:Emailer and encryption (1997) international time (1997) Semi-OT: PanIP patent infringement case (2001) Help name our technology! I found it (1997) Search/sort in URL Was: GuestBook example (1997) GoodPath and MoveFile (2000) two unique banners on one page (1997) webcat license???? (1997) New Command prefs ... (1997)