On Sat, 2004-01-31 at 12:57, Michal Migurski wrote: > >> users uploading two identically named files at the same time (not all > >> /that/ unlikely), and you are using a database table to track > > > >Really? You don't think it's that uncommon? Please give an example as I > >can't think of any. Not like that's saying much. :) > > I used microtime() to differentiate them, but in retrospect it should have > been a no-brainer to use the database primary id to help differentiate > these, since the DB already did all the heavy lifting involved in ensuring > uniqueness.
Even though it seems incredibly unlikely, isn't is safer to just not worry about it and use unique ids instead? Why take the risk when you can use an autonumber from a database or md5(uniqid(rand(), true)), or even: time() . md5(uniqid(rand(), true)) if you want to be really paranoid? -- Adam Bregenzer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php