Home > database >  Mysql only part of the need on the primary key
Mysql only part of the need on the primary key

Time:10-15

Existing ABCD four populations, id for the category number + insertion order serial number, such as:
10023 is A kind of personal information, 23 41067 for class D 1067 personal information,
Table name card, attributes: id (primary key), name, age, type, have a web form to collect the name, age, type of information, submit the form after 1 returns a id, automatic

I want to write a trigger, new tuples can automatically generate an id based on category, when want to ask how to make the insertion order serial number on the 7 23106?

Or PHP implementation can
Thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • Related