I have a ID field that auto increments ID's when a user joins. I have 138 users at the moment. However i want to give users a 6 digit ID, so i was thinking of setting ID's for any new users who join at 100001, instead of moving onto 139 How would i go about doing this...
You specify that when You create the database table. You can set the starting point of the INT unique field. That is if you want the ID to be specified automatically by MySQL, when a row is inserted. But ofc you can do it manually, just check which is the biggest existing ID in the table, and next user gets $id = $existingID++;
Yep...you could set the start of increment from mysql or drop the auto_increment feature from mysql and leave this job in PHP's hands. The second will take more resources with it since the script will have to do a query to extract before figuring out what's the biggest ID in the db and than increment it via ++.