I'm still researching all of this... but ah, I was wondering if anyone had any tips on doing something like this. I think I could probably run a cron job, but really, I know almost nothing about those.
I have this tagboard and what I'd like to do is automatically delete posts if there are more than 15 in the DB. So only 15 messages can exist in the DB at any given time.
Here's my insert query (tagid automatically increments)...
$DB->query("INSERT INTO tagboard (tagid, submitted, name, uid, submitdate, message ipaddress)
VALUES ('','$submitted','$name','$uid','".time()."', '$message', '$ipaddress')");
And that works just fine. Is it possible to run a delete query right after the insert though in order to remove the older entries so that only 15 remain in the DB? I've been trying to do this, but can't seem to get it to work. Any help would be awesome. Thanks. 🙂