Re: generating unique IDs

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 30500
interpreted = N
texte = On 4/11/00 10:52 AM, Nico at tmpx1@hotmail.com wrote:> on 11/04/2000 15:21, Phil Marshall at phil@signalz.com wrote: > >> QUESTIONS: >> 1. Can I continue to assume this in my future on MacOS X? >> 2. Is there a better way to create unique record IDs? > > 1: No. Don't assume anything, if you don't have to :) > 2: You should allways use the [cart] builting WebDNA function for making > unique ID's. Each call to it will return an ID that is guaranteed to be > unique. Thus, you can replace all that code you use now with [cart].I prefer using [cart][date %Y%m%D%H%M%S] to generate the SKU value just in case I forget to dispose of the [cart] variable after adding a record or ship my code to another server which could conceivably cough up a [cart] that already existed on the previous server. Having a 24-digit SKU might seem like overkill, but it definitely avoids the bad juju from having a duplicate SKU. -- Andrew Vernon avernon@dramatols.net------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re: generating unique IDs (Andrew Vernon 2000)
  2. Re: generating unique IDs (Nico 2000)
  3. generating unique IDs (Phil Marshall 2000)
On 4/11/00 10:52 AM, Nico at tmpx1@hotmail.com wrote:> on 11/04/2000 15:21, Phil Marshall at phil@signalz.com wrote: > >> QUESTIONS: >> 1. Can I continue to assume this in my future on MacOS X? >> 2. Is there a better way to create unique record IDs? > > 1: No. Don't assume anything, if you don't have to :) > 2: You should allways use the [cart] builting WebDNA function for making > unique ID's. Each call to it will return an ID that is guaranteed to be > unique. Thus, you can replace all that code you use now with [cart].I prefer using [cart][date %Y%m%D%H%M%S] to generate the SKU value just in case I forget to dispose of the [cart] variable after adding a record or ship my code to another server which could conceivably cough up a [cart] that already existed on the previous server. Having a 24-digit SKU might seem like overkill, but it definitely avoids the bad juju from having a duplicate SKU. -- Andrew Vernon avernon@dramatols.net------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Andrew Vernon

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:

Logical and or in [hideif] (1997) WebCatalog 2.1b4/Mac available (1997) WebCatalog2 Feature Feedback (1996) Removing a character (2000) weight based shipping cost questions (1997) MacWEEK article help needed (1996) [CART] (1997) Sorry But This seems to be my fate (2000) Page Counters? (1997) [shownext max=?] armed (1997) searchable list archive (1997) [WebDNA] unix-Linux Intel Apache Module version 8.0.2 (2016) Server Error Question [bug?] (2004) What abobut variables named max ??? (2000) Configuring E-mail (1997) PCS Frames (1997) First postarg not taking in $Commands (1997) Exclamation point (1997) [WebDNA] eTrader.TV (2009) Size limit for tmpl editor ? (1997)