Custom type auto increment id codeigniter

noob

New Member
I have a table called \[code\]user\[/code\] in my mysql database. I have an auto increment \[code\]id\[/code\] field and a \[code\]member_id\[/code\] field. and another radio button for choosing package. \[code\]S for standard and P for premium\[/code\]. I want to set my member id as \[code\]P000001\[/code\] or \[code\]S000001\[/code\] for the first id according to the chosen package.\[code\]For example if the first member choose P his member_id will be P000001 if the second member choose S his member_id will be S000002 if the third member choose S his member_id will be S000003 ... ...\[/code\]The \[code\]member_id\[/code\] will be exact 7 in length with P or S.
 
Back
Top