Home > Article > Backend Development > Solve the problem of duplicate unique index in thinkphp (picture)
The following editor will bring you an article that perfectly solves the problem of thinkphp's only indexduplicate error. The editor thinks it is quite good, so I will share it with you now and give it as a reference for everyone. Let’s follow the editor and take a look.
For example, the following fields (g_check_id): unique index
Ifinsert data If the same value appears when (g_check_id), the program itself will report an error.
So do something like the following:
The above is the detailed content of Solve the problem of duplicate unique index in thinkphp (picture). For more information, please follow other related articles on the PHP Chinese website!