Hey guys,
Another thread has inspired me to change the way I run things. At the moment I have a member table etc... The primary key is set as an autoincrement number, however I have obviously made it so that people cannot have the same user name as each other. So am I wasting my time with this? Should I make the primary key the user name?
If not, how can I autoincrement, but not run the risk of having my id numbers changed if I reorganised for some reason? I am thinking if I want to have a customised autoincrement, I will need to store a number that turns over everytime someone registers and use that as the user number. That way if someone deletes their account the number will not be -1. Is this the way to do it, or is there another common way?
Another thread has inspired me to change the way I run things. At the moment I have a member table etc... The primary key is set as an autoincrement number, however I have obviously made it so that people cannot have the same user name as each other. So am I wasting my time with this? Should I make the primary key the user name?
If not, how can I autoincrement, but not run the risk of having my id numbers changed if I reorganised for some reason? I am thinking if I want to have a customised autoincrement, I will need to store a number that turns over everytime someone registers and use that as the user number. That way if someone deletes their account the number will not be -1. Is this the way to do it, or is there another common way?
Comment