Re: CART question
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 59990
interpreted = N
texte = Patrick J. wrote:> The client is concerned that 15 numbers is too long for the membership > ID. Would it be a bad thing to, say, [getchars] on the last 8 numbers > of the [cart] before storing it in the db? Are those 8 numbers always > different under the algorithm WebDNA uses, or is it still possible to > end up with a duplicate number if I don't use the whole [cart] value?The cart is a unique _character string_ that is typically 15 characters long (it used to be shorter before we entered the last power of two seconds) but can be longer. It is based on the number of seconds since the Unix Epoch, plus a uniquifier sequence, so that no matter how many carts are assigned in a given second, all carts are supposed to be unique (up to the granularity of the unique portion).Consequently, you should never:a) treat a cart as a number (it's not and only sorts properly as a variable length string and it will in fact overflow most number fields);b) truncate the cart value for some other purpose.HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------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 Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Patrick J. wrote:> The client is concerned that 15 numbers is too long for the membership > ID. Would it be a bad thing to, say, [getchars] on the last 8 numbers > of the [cart] before storing it in the db? Are those 8 numbers always > different under the algorithm WebDNA uses, or is it still possible to > end up with a duplicate number if I don't use the whole [cart] value?The cart is a unique _character string_ that is typically 15 characters long (it used to be shorter before we entered the last power of two seconds) but can be longer. It is based on the number of seconds since the Unix Epoch, plus a uniquifier sequence, so that no matter how many carts are assigned in a given second, all carts are supposed to be unique (up to the granularity of the unique portion).Consequently, you should never:a) treat a cart as a number (it's not and only sorts properly as a variable length string and it will in fact overflow most number fields);b) truncate the cart value for some other purpose.HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------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 Web Archive of this list is at: http://webdna.smithmicro.com/
John Peacock
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:
more on my bbs (1997)
It just Does't add up!!! (1997)
Checking two required fields (1998)
Problem with ShoppingCart.tpl refresh (2000)
Encyption mail was Suggestions for Topics ... (1998)
Resolving variables into field names (1998)
[WebDNA] WebDNA & VPS (2009)
Pithy questions on webcommerce & siteedit (1997)
Trunk-gator (1997)
shownext (1997)
[encrypt] entire site? (2003)
WebCat2b15MacPlugin - showing [math] (1997)
Web Catalog Book? (1998)
WC2.0 Memory Requirements (1997)
unusual search problem (1998)
Help! (2000)
Loss in Form (1998)
A multi-processor savvy WebCatalog? (1997)
OK, here goes... (1997)
splitting numbers in webDNA? (1997)