title: PHP & mySQL(i): How to generate a random user id?
body: <p>say if I wanted to give every user that registered on my site a unique id. It seems to me that if I wanted to do this I would have to: Create a random number for the id, check to see if that id already exists in the database, if it does exist then create another random number and send yet another query to see if that exists, and so on...</p>
  
  <p>This could go on for ages. Apart from having an incrementing id, is there any decent way to do this?</p>