How do I create a random unique string in MySQL?
when I need to create a random string in PHP I use this function:
public function generateString($le
Why not just use the built-in functions for generating unique identifiers? You wouldn't have to worry about duplicates that way.
Both PHP and MySQL have their own.
PHP: uniqid()
MySQL: UUID()