I am not going to paste the code here and hope the statement of the prob is enough to pose the question .
i inserted 3 rows in a mysql table, deleted the 2nd one and then inserted the 4th one and all these things i did by writing code in php. but the 4th one sits in the place of the deleted one. That is I wanted the order of the ids(primary key) to be 1,3,4. but now it be开发者_JAVA百科comes 1,4,3.
Thanks in advance for any solution.
Istiaque Ahmed Bangladesh
if you dont specify the sort order in your query then the db can return the rows in any order, so specify the sort order and all will be well
Change the table storage engine to InnoDB.
MyISAM and InnoDB
精彩评论