Welcome Guest, Not a member yet? Register   Sign In
How to create random, but unique IDs?
#11

[eluser]n0xie[/eluser]
You could of course generate a list of available id's as a cronjob, and place them in a temp table/memory/file/xml/whatever. It depends on how many new id's you think you'll need on a day to day basis. You could even just store them in memory as an array and just remove any used id from that array, then schedule a background task to repopulate the array with new id's.

This would make new id's instantly available, plus it would save you database lookups every time you need a new id.


Messages In This Thread
How to create random, but unique IDs? - by El Forum - 05-12-2010, 12:14 PM
How to create random, but unique IDs? - by El Forum - 05-12-2010, 12:34 PM
How to create random, but unique IDs? - by El Forum - 05-12-2010, 01:10 PM
How to create random, but unique IDs? - by El Forum - 05-12-2010, 01:14 PM
How to create random, but unique IDs? - by El Forum - 05-12-2010, 01:34 PM
How to create random, but unique IDs? - by El Forum - 05-12-2010, 01:38 PM
How to create random, but unique IDs? - by El Forum - 05-12-2010, 01:55 PM
How to create random, but unique IDs? - by El Forum - 05-12-2010, 01:59 PM
How to create random, but unique IDs? - by El Forum - 05-12-2010, 02:24 PM
How to create random, but unique IDs? - by El Forum - 05-12-2010, 02:53 PM
How to create random, but unique IDs? - by El Forum - 05-13-2010, 06:49 AM
How to create random, but unique IDs? - by El Forum - 05-13-2010, 01:26 PM
How to create random, but unique IDs? - by El Forum - 05-13-2010, 01:51 PM
How to create random, but unique IDs? - by El Forum - 05-13-2010, 02:45 PM
How to create random, but unique IDs? - by El Forum - 05-13-2010, 07:03 PM
How to create random, but unique IDs? - by El Forum - 05-14-2010, 12:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB