Is mysql auto increment safe to use as userID?
I am working on website that allows people to create profiles online. I was wondering if it is the right choice to use MySQL AUTO_INCREMENT ed IDs as my user ids. Also bearing in mind that I might have to duplicate the database across multiple servers one day? e.g. would you use this method for userIds on a website like Twitter or Facebook? I have tried generating userIds with PHP before. I used something like this: function generateID() { $possible = "1234567890"; $code = ""; $characters = mt_rand(7,14); $i = 0; while ($i < $characters) { $code .= substr($possible, mt_rand(0, strlen($possible