I want to put some text in front of my auto increment field with mysql, but I still have no answer to do this. here is the example data that I want to insert into table
"IDC00000001"
and what I do now just auto incremented integer with zerofill format, and the result just 00000001.
and I want the number auto incremented. so when Insert some data again it will be like this "IDC00000002", "IDC00000003",........,"IDC00000022",etc
my questions:
- how to solved this case?
- am I need a store procedure?
- what is best practice to do this, prepare this in php before insert or in mysql directly?