Hi,
If you don't want your SQL server to get huge, you should set trigger that will delete old logs records:
You can change "2" to any numbers of days you want to save logs for.
If you don't want your SQL server to get huge, you should set trigger that will delete old logs records:
PHP:
delimiter |
CREATE EVENT IF NOT EXISTS `Clean_Old_logs`
ON SCHEDULE
EVERY 1 DAY
COMMENT 'Clean up logs'
DO
BEGIN
DELETE FROM stream_logs WHERE date < (UNIX_TIMESTAMP()-60*60*24*[b]2[/b]);
DELETE FROM client_logs WHERE date < (UNIX_TIMESTAMP()-60*60*24*[b]2[/b]);
END |
delimiter ;
You can change "2" to any numbers of days you want to save logs for.