I have an existing database using PHP, MySQL and phpMyAdmin.
When users become a member on my website, I need the system to create a unique membership number for them using a five digit number. for e.g 83773. I guess it is like generating a random password except I only want numbers for my members. This ID number has to be unique to each member.
Would it be possible for me to set the primary key to auto_increment in my user table and set it to start at 10000 and then auto increment every time a member registers?
Also, is there a maximum number that the primary key ID number would go up to?
Is this a reliable and safe way to use the primary key ID number as a membership number?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…