Hello,
Can anyone give show a simple tutorial (step-by-step) to generate custom customer_id in a database table? For example, I have a table named Customer and would like to generate customer_id like the following example:
Table structure:
customer_id (auto-increment), fullname, address, contact, email
Example of customer_id as: 2011-AB001, 2011-CA001, 2012-DA001, 2005-FR001
20 as current year, 11 as current month, AB / CA / DA / FR as first 2 characters of customer name and 001 as increment number.
Regards,
Josh