SA-MP Forums Archive
Player Number in database [MYSQL] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Player Number in database [MYSQL] (/showthread.php?tid=314057)



Player Number in database [MYSQL] - thimo - 28.01.2012

I wanted to give every person who registers at server a special ID in the database but how do i do this? :S Anyone an idea?


Re: Player Number in database [MYSQL] - [MG]Dimi - 28.01.2012

Create new column inside table. Set it to any integer and mark Auto-increment. That will give specific ID to each Table entry.


Re: Player Number in database [MYSQL] - Scenario - 28.01.2012

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
Create new column inside table. Set it to any integer and mark Auto-increment. That will give specific ID to each Table entry.
Just a heads up, I find working with database ID's to be a bit difficult. I've always found that it's easier to use usernames as the primary index in the DB. However, if you were going to make something like a master account and then allow people to create secondary accounts, under that master account- DB ID's would be a good idea I suppose.


Re: Player Number in database [MYSQL] - thimo - 28.01.2012

Realcop i totally agree with you but since iam making this GM with integrated site it might be usefull... And i already got it fixed Thanks for trying to help