I have a chat script written on PHP Ajax and MySQL. It keeps the message logged on a table "usermsg".
My problem is that I have only a MySQL db of 100mb and I can't keep all the messages, as I have 55 users and my db quota is not enough to stock all and when it's full my chat stops automatically. So I perform truncat from PhpMyAdmin each time I feel that it is almost full. What I want to do is somehow perform truncat hourly so it can clear my table every hour.
Can somebody help with a PHP script or something to do that? Thanks.