Reputation: 709
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 becomes 1,4,3.
Thanks in advance for any solution.
Istiaque Ahmed Bangladesh
Upvotes: 0
Views: 208
Reputation:
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
Upvotes: 2