I'm making a data base and I would like to get two unique ids from each player like clash royale game .
1.id unique only number (It knows only the user)
2.id unique number and letters (all the players can see it).
I was thinking of using the time to get the first unique id, and then add a random number, but I think this would create a string that is too long. Moreover it does not guarantee 100% yet to obtain a unique id.
I'm working with PHP and MySQL