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
And there’s 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.
The above is the entire content of this article. I hope it will be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!
Related recommendations:
About data transmission CURL in PHP
How to use PHP to achieve page registration and audit
The above is the detailed content of Analysis and solutions to the causes of discontinuity in ID settings in PHP after they are incremented. For more information, please follow other related articles on the PHP Chinese website!