I am looking to create a database of logs from users logging in but only keep the last 2 records.. the first one would be there last time they logged and the second one would be there current log in time. Is this possible or is there allot of database queries to make it happen?
DBQuery("INSERT INTO ".SECURITY_LOG_TABLE." SET ".
"login_date = NOW(), ".
"ip_address = '".addslashes($SESSION['ip_address']) ."', ".
"login_id = '".addslashes($USER['login_id']) ."' ");
This is what I have created before and have been using but the logs are getting to large and would like to help cut them back some how..