Unique Cell phone number help
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
Saving system? If you use MySQL, create a new table to link a phone number to a player and set the number to be the primary key and auto increment. That way it's guaranteed to be unique.

You could also append the current Unix timestamp (returned by gettime()), although that may make the number too long. It also won't be unique if two or more players are assigned a number at the same second.
Yeah, I didn't think of just saving the number with player's stats. That's even better idea.
With auto increment, it will start from 1 (or maybe 0) right? That seems like a too short number IMO. I would still try with random and see how it turns out.
Reply


Messages In This Thread
Unique Cell phone number help - by Jakwob - 25.05.2015, 17:23
Re: Unique Cell phone number help - by dominik523 - 25.05.2015, 17:26
Re: Unique Cell phone number help - by Vince - 25.05.2015, 17:28
Re: Unique Cell phone number help - by dominik523 - 25.05.2015, 17:32
Re: Unique Cell phone number help - by Jakwob - 25.05.2015, 17:35
Re: Unique Cell phone number help - by Jakwob - 25.05.2015, 17:39
Re: Unique Cell phone number help - by Crayder - 25.05.2015, 17:47

Forum Jump:


Users browsing this thread: 1 Guest(s)