Player id in database

In my game I store player data on a database.

So I have a table called “players” with a unique record id.

Now I would like to have two more fields:

Private_PlayerID : that can only be seen by the player and I would like it to be unique and of equal length

Pubblic_PlayerID (like tag) : that can be seen by all the players of the app to uniquely recognize users with the same names (equal length)

But I do not know how to create these two unique ids. Other games I see that use numbers and letters but creating a string of equal length.

What can I do to get this?

I’m using PHP and MySQL

Hi,

Your question is not really Corona related, but I’ll point you in a direction http://php.net/manual/en/function.uniqid.php

In the future you should only be posting Corona specific questions in these forums.  :slight_smile:

-dev

Hi,

Your question is not really Corona related, but I’ll point you in a direction http://php.net/manual/en/function.uniqid.php

In the future you should only be posting Corona specific questions in these forums.  :slight_smile:

-dev