Hello,
I want to generate an unique id (not only from digits, about 10 characters length) for every file in my mysql database.
How to do that?
Thank you.
Using auto increment would be a simple solution.
laserlight wrote:Using auto increment would be a simple solution.
I meant, something like YouTube (http://youtube.com/watch?v=SmVsa1SFgfU) - not easy guessable.
Take a cryptographic hash of the filename (and perhaps the current time, or the output of mt_rand(), or something like that). You could also look into [man]uniqid/man.