Articles By Category
Concord Business Services Unique ID Generator
Short and Sweet
This should be used for a permanent key if and only if there is code to determine if a generated value is a duplicate, and only if there are a pretty small number of records using this. Number of possible values is only 72^5 = 1,934,917,632. Also, there is no check to see if the code accidentally generates a bad word, or something that sounds like a bad word. But it's pretty cool that with just 5 characters, and using only digits and letters, we can come up with almost two billion combinations, don't you think?
Same caveats as above, but possible values are 72^12 = 19,408,409,961,765,342,806,016. Pretty darn safe to use, I think.
A full-blown, true guid for the purists. It starts with a 12-character are a unique id generated by each refresh (same as the Medium number above). Then, there's a php-generated guid based on the millisecond that the refresh occurred, combined with the medium number as a seed. Finally, I insert three punctuation characters in the string at random positions.
Every once in a while, I run a program, and I have a piece of debug information that prints to the screen when I don't want it there. And sometimes, I've lost where the bit of debug code is. If it's just printing some intermediate value, it's really hard to search several files of code and find the offending line. So I copy and paste this bit in front of my debug lines, just to make it easy to undo.
print '<br />lWVe8 debug code - remove me<br />';