Program stopped adding new entries at end of db; inserts them out of chrono order
I have a small program and a small database, both of which I constructed myself, using PHP and MySQL.
The database has two simple tables, one for user registration info ('registration') and one for user data entries ('temperatures').
The program was constructed in response to a need of mine, and I remain by far its most frequent user.
Both program and database were working well except that a spammer would sometimes succeed in adding spam entries. One day I went into PHPMyAdmin and deleted most of the spam entries. I did this by deleting rows in the 'temperatures' able.
The program has not worked properly since that time. Now, when I make a new entry, the new row is not added at the end of the database but is inserted 'up-table'. For example, a new entry made today, 1-22-2014, should be added at the end of the database but will instead be added between two old entries, e.g., between 6-17-12 and 6-30-12 or between 10-1-2013 and 10-9-2013. (I don't add an entry every day.) There does not seem to be any rhyme or reason to the location where the new entry is added -- it does not seem to be in any apparent order.
I'd like to go back to adding new entries in chronological order, i.e., at the end of the table. Can anyone help me understand what went wrong? and how to fix it?
Thank you so much for any help you can give.