CodeIgniter Forums

Full Version: plug in for generate Member ID/Student ID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I need suggestion tools that can help me to generate ID.. example
Code:
LD0001, LD0002,.. 

and it is increment.
The max is LD9999?
Use the normal database increment and use http://www.php.net/str_pad

PHP Code:
echo 'LD'.str_pad('20'4'0'STR_PAD_LEFT); 
(12-26-2016, 10:53 PM)Paradinight Wrote: [ -> ]The max is LD9999?
Use the normal database increment and use http://www.php.net/str_pad

PHP Code:
echo 'LD'.str_pad('20'4'0'STR_PAD_LEFT); 

what is normal database increment?? Undecided
(12-27-2016, 03:17 AM)falcon812311 Wrote: [ -> ]
(12-26-2016, 10:53 PM)Paradinight Wrote: [ -> ]The max is LD9999?
Use the normal database increment and use http://www.php.net/str_pad

PHP Code:
echo 'LD'.str_pad('20'4'0'STR_PAD_LEFT); 

what is normal database increment?? Undecided

Code:
CREATE TABLE Tablename
(
ID int NOT NULL AUTO_INCREMENT
...
)