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. HTH John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 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:

    
  1. Re: CART question ( Donovan Brooke 2004)
  2. Re: CART question ( Brian Fries 2004)
  3. Re: CART question ( devaulw@onebox.com 2004)
  4. Re: CART question ( Patrick J. 2004)
  5. Re: CART question ( Donovan Brooke 2004)
  6. Re: CART question ( John Peacock 2004)
  7. Re: CART question ( Stuart Tremain 2004)
  8. Re: CART question ( "Sal D'Anna" 2004)
  9. Re: CART question ( 2004)
  10. CART question ( Patrick J. 2004)
  11. Re: More Shopping Cart Questions/Problems (Brian Boegershausen 2000)
  12. More Shopping Cart Questions/Problems (Brady J. Horenstein 2000)
  13. Re: Cart Question: The Epic Saga (Will Starck 1998)
  14. Re: Cart Question: The Epic Saga (Will Starck 1998)
  15. Re: Cart Question: The Epic Saga (PCS Technical Support 1998)
  16. Re: Cart Question (Kenneth Grome 1998)
  17. Re: Cart Question (PCS Technical Support 1998)
  18. Re: Cart Question (Will Starck 1998)
  19. Re: Cart Question (Kenneth Grome 1998)
  20. Re: Cart Question (Will Starck 1998)
  21. Re: Cart Question (PCS Technical Support 1998)
  22. Re: Cart Question (Bob Minor 1998)
  23. Re: Cart Question (Will Starck 1998)
  24. Re: Cart Question (Kenneth Grome 1998)
  25. Re: Cart Question (Bob Minor 1998)
  26. Re: Cart Question (Bob Minor 1998)
  27. Re: Cart Question (Will Starck 1998)
  28. Re: Cart Question (PCS Technical Support 1998)
  29. Re: Cart Question (Will Starck 1998)
  30. Re: Cart Question (charles kline 1998)
  31. Re: Cart Question (PCS Technical Support 1998)
  32. adding item to cart question (Chris Martin 1998)
  33. RE: Shopping Cart Questions (PCS Technical Support 1998)
  34. RE: Shopping Cart Questions (Pat McCormick 1998)
  35. RE: Shopping Cart Questions (josh 1998)
  36. Re: Shopping Cart Questions (Rob Marquardt 1998)
  37. Shopping Cart Questions (josh 1998)
  38. RE: Shopping Cart Questions (Pat McCormick 1998)
  39. Price lookup problem - was Re: Cart questions (Paul Winchester 1997)
  40. Re: Cart questions (Grant Hulbert 1997)
  41. Re: Cart questions (Grant Hulbert 1997)
  42. Re: Cart questions (Paul Winchester 1997)
  43. Re: Cart questions (Paul Winchester 1997)
  44. Re: Cart questions (Grant Hulbert 1997)
  45. three cart questions (Thomas Wedderburn-Bisshop 1997)
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. HTH John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 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)