Post displaying out of order

I’m just learning and I have an annoying problem with my blog display…

When I delete an entry in my blog (test post, mistake, whatever) then post another entry, it fills in the deleted post’s spot.
How do I stop that from happening?

ex. (after deleting post id# 3 then writing post id# 6, #6 displays out of order in #3’s spot.)

id# 1
id# 2
id# 6
id# 4
id# 5

Copy of my table…


CREATE TABLE `testblog` (
`id` int(4) NOT NULL auto_increment,
`comment` varchar(1000) NOT NULL,
`datetime` varchar(65) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Thanks in advance…

Thank you for your help. That worked…

sorting by a VARCHAR(65) “datetime” column will only work if you actually store the values in year-month-day-hour-minute sequence

you should really be using DATETIME as the datatype instead, and give the column a better name

If you want the entries to be by id number then you should use it on the ID field, if you want the entries to be by date and time then you should use it on the datetime field

Are you using an ORDER BY clause and if so, which field are you using it on?

No.

If I need to, which field should I put it in and how?