This article mainly introduces the analysis and solutions to the reasons for the discontinuity of ID settings in PHP after they are incremented. Friends in need can refer to the following
ID settings in PHP The analysis of the reasons for discontinuity after self-increment is as follows:
alter table tablename drop column id; alter table tablename add id mediumint(8) not null primary key auto_increment first;
Add these two lines each time you delete them That’s it
There is also this
Using the query() method in the mysqli object can only execute one SQL command per call.
If you need to execute multiple SQL commands at one time, you must use the multi_query() method in the mysqli object. The specific method is to write multiple SQL commands in the same string and pass them as parameters to the multi_query() method, and use semicolons (;) to separate multiple SQL commands. If the first SQL command is executed without errors, this method will return TRUE, otherwise it will return FALSE.
Summary: The above is the entire content of this article, I hope it will be helpful to everyone's study.
Related recommendations:
php Detailed introduction to operators and expressions
php js implements multi-point annotation on Baidu map
Detailed explanation of several ways of handling passwords in PHP
The above is the detailed content of Reasons and solutions for the discontinuity of ID settings in PHP after they are incremented. For more information, please follow other related articles on the PHP Chinese website!