Hello! I have a question: how to make it so that if there are more than 25 entries in the messages table, then the entries are deleted (the table remains!). Help.

    1 answer 1

    <?php $res = mysql_query('select count(*) as `amount` from `messages`'); $row = mysql_fetch_assoc($res); if($row['amount']>25){ mysql_query('TRUNCATE TABLE `messages`'); } 

    Something like this. Run on the crown or manually. How convenient.

    • Thank! It really helped! - MrGons18