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?
Related Posts:
- How to log in to phpMyAdmin with WAMP, what is the username and password?
- mysqli_real_connect(): (HY000/2002): No such file or directory
- phpMyAdmin: secret passphrase?
- Forbidden :You don’t have permission to access /phpmyadmin on this server
- mysqli_real_connect(): (HY000/2002): No such file or directory
- Fix Access denied for user ‘root’@’localhost’ for phpMyAdmin
- “Connection for controluser as defined in your configuration failed” with phpMyAdmin in XAMPP
- phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user ‘pma’@’localhost’ (using password: NO)
- MySQL Daemon Failed to Start – centos 6
- Visual list of all installed fonts with respective pangram phrase?
- count() parameter must be an array or an object that implements countable in laravel
- Fatal error: Call to undefined function mysql_connect()
- Mysql query- How to use contains?
- what does PHP die() return
- Invalid column count in CSV input on line 1 Error
- how to replace quotation marks with \”
- mcrypt is deprecated, what is the alternative?
- How to echo or print an array in PHP?
- Resize image in PHP
- How to replace “if” statement with a ternary operator ( ? : )?
- why use 0xffff over 65535
- Email Not Sending from Byethost Hosting
- .rar, .zip files MIME Type
- PDO bindParam() with prepared statement isn’t working
- HTML Element Array, name=”something[]” or name=”something”?
- Why use $_SERVER[‘PHP_SELF’] instead of “”
- Setting up a PHP interpreter in PhpStorm
- PHP: $_SERVER variables: $_SERVER[‘HTTP_HOST’] vs $_SERVER[‘SERVER_NAME’]
- Illegal string offset Warning PHP
- Fatal error: Call to undefined function mysqli_connect()
- Could not open input file: artisan
- Why php tag is not working in html file?
- What’s the use of ob_start() in php?
- PHP: variables in strings without concatenation
- What is the difference between the ‘www’ folder and ‘htdocs’ folder?
- Notice: Trying to get property of non-object error
- undefined offset PHP error
- PHP mail not working for some reason
- Get Root Directory Path of a PHP project
- Returning JSON from PHP to JavaScript?
- How to create cron job using PHP?
- Imploding an associative array in PHP
- curl POST format for CURLOPT_POSTFIELDS
- Can’t use method return value in write context
- PHP get domain name
- How to solve “Fatal error: Class ‘MySQLi’ not found”?
- Running a Python script from PHP
- Object of class DateTime could not be converted to string
- HTTP Error 411, The request must be chunked or have a content length
- mysqli::query(): Couldn’t fetch mysqli
- Fatal error: Call to undefined function sqlsrv_connect()
- NotFoundHttpException in RouteCollection.php line 161: in laravel 5
- Easy way to password-protect php page
- Html encode in PHP
- file_put_contents: Failed to open stream, no such file or directory
- PHP json_decode() returns NULL with valid JSON?
- Why do I have to run “composer dump-autoload” command to make migrations work in laravel?
- PHP $_POST not working?
- PHP cURL HTTP PUT
- Convert timestamp to readable date/time PHP
- PHP sessions that have already been started
- Contact Form 7 – Custom Validation
- How to output JavaScript with PHP
- WRONGTYPE Operation against a key holding the wrong kind of value php
- What is the advantage of using try {} catch {} versus if {} else {}
- Check if URL has certain string with PHP
- Subtracting days, months or years from date using php
- Laravel – Model Class not found
- Fatal error: Call to a member function fetch_assoc() on a non-object
- What is unexpected T_VARIABLE in PHP?
- How to close Browser Tab After Submitting a Form?
- Strict Standards: Only variables should be assigned by reference PHP 5.4
- mysqlworkbench giving version error on exporting database
- Steam Market API?
- PHP array delete by value (not key)
- PHP mail: Multiple recipients?
- Having a problem getting mysqli_query to execute
- PHP Multiple Checkbox Array
- Session variables not working php
- PHP Warning: PHP Startup: Unable to load dynamic library
- Do I need a !DOCTYPE declaration in a php file with html?
- How get value from URL
- Get JSON object from URL
- How can I parse a JSON file with PHP? [duplicate]
- Object of class stdClass could not be converted to string
- How to get URL of current page in PHP
- How to push both value and key into PHP array
- WordPress visual composer not loading
- Find the last element of an array while using a foreach loop in PHP
- Popup window in PHP?
- How can you use php in a javascript function
- How to bypass (deprecated) reCAPTCHA V1?
- Adding days to $Date in PHP
- Way to send multiple values for column to MySQL?
- Unable to insert two value in two different columns (WordPress database)
- why not selecting multiple rows of same standard_id using SQL query from database?
- submit form data to wordpress existing database table using my plugin
- 403 Forbidden Localhost Wamp Apache Php
- Changing WordPress author name in database
- Importing data from excel sheet on webpage rather than from within phpMyAdmin