Generatinge Unique Id on the fly Mysql + PHP -
I am trying to come up with a solution specifically to generate a unique ID on the fly. The area of use can be an order, product or plan ID, where no security is involved. I do not like the idea of generating random numbers and then DB should check its specificity and repeat the process, if it is not in this case where security is not a problem. Besides, I do not like to use auto-emoticon id because it looks very easy. My initial thought is that the combination of Auto Enerment ID + Timestamp has to convert the decimal value to hex, it seems like a random string and then finally prefixing and suffixing with 2 digit random strings. Generate function UID ($ num) {$ str = dechex (time () + intval ($ num)); $ Prefix = dashx (rand (1,15)); $ Suffix = decex (rand (1,15)); Return Strawper ($ suffix. $ Str. $ Prefix); } Where $ num is the auto_increment id returns such as E53D42A046 is the correct way to know what to do Is Collision Issues? Thank you for all the resp...