Hello ,
I am developing a web application.I am trying to build a
functionality where user will be able to insert a new record in a
table in backend MySql DB.When inserting a new ticket/record, I
want the system to assign a record number/ticket number which will
be unique to that particular ticket.I am trying to concatenate the
company id of the user and the Id( Index) column, so that I get a
unique ticket number.The problem is that the Id is generated when
the record is inserted, so I cannot reference it in my insert
query.Is there a way I can get my way around it and generate a
unique ticket number of the format ABC12 ( ABC: Company_Id and 12:
picked from ID column as of now.)?