Guest RichardsonDA Posted September 26, 2005 Share Posted September 26, 2005 I was wondering how the order number is generated; it appears like the last 4 digits are random. 050925-005343-1476 05 = Year 09 = Month 25 = Day 00 = Hours 53 = Minutes 43 = Seconds 1476 = ?????? Any ideas? I have many that dont end in a sequence 5421 1900 7359 9271 1476 I dont see a patten Thanks Dave Quote Link to comment Share on other sites More sharing options...
Guest EverythingWeb Posted September 26, 2005 Share Posted September 26, 2005 The last 4 digits are random, you are correct. It would be very VERY unlucky and highly highly unlikely that at the very same second, of the very same minute, of the very same hour... (you get the picture - the exact same time) that the random number generates 4 random numbers the same as a another. I wonder what the chances are........... Quote Link to comment Share on other sites More sharing options...
Guest Posted September 26, 2005 Share Posted September 26, 2005 Well, I believe that the rand function in PHP 4.3.0 and above is self-seeded based on CPU clock ticks (extremely high number per second) and is re-seeded on each call of rand, so it would be functionally impossible. Two requests could not stream through the CPU on the same tick so therefore could not get the same random number. Just food for thought. Why do I know? I just did some studying of the rand / mtrand / srand / smtrand functions in PHP to get my random sort order mod working properly. :w00t: Quote Link to comment Share on other sites More sharing options...
Guest RichardsonDA Posted September 26, 2005 Share Posted September 26, 2005 so.............Random it is then Thanks Least I know know Dave Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.