Hi all,
I tried to search for an answer to this but the worls "limit", "table", "size" etc. come up a lot
I'm creating a shoutbox for my site. I've got a simple table where I store the shouts (contains 4 fields: ID, Name, Shout & Date. ID auto increments). I want to ensure that this table sticks to a certain size (say 25 rows). Obviously I want the least recent shouts to be deleted.
What's the best way to do this? A trigger; limiting the table to a set amount of rows and it'll hopefully remove the oldest rows to make room (couldn't see anything to do this in phpMyAdmin. SQL knowledge doesn't go past the basics); or simply deleting a row everytime I insert a new one past the count of 25?