Cause Analysis and Solution of discontinuous ID settings in PHP after auto-increment, php Cause Analysis
In PHP, the reason for the discontinuous ID settings after auto-increment is described as follows:
Alter table tablename drop column id; alter table tablename add id mediumint (8) not null primary key auto_increment first;
Add the two lines to each deletion.
This is also the case.
You can use the query () method in the mysqli object to execute only one SQL command at a time.
To execute multiple SQL commands at a 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. Multiple SQL statements are separated by semicolons. If no error occurs during the execution of the first SQL command, TRUE is returned for this method. Otherwise, FALSE is returned.
The above section describes the Cause Analysis and Solution for the discontinuous ID settings in PHP after auto-increment. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner, and I would like to thank you for your support for the help House website!