Getting Rid of old players

MyPHPadmin or whatever tool you use to manage your database (Navicat, heidiSQL, ...). Then use it as a MySQL-query. If you are totally new to this you might want to read some SQL-tutorials before you start messing with the database ;)
 
MyPHPadmin or whatever tool you use to manage your database (Navicat, heidiSQL, ...). Then use it as a MySQL-query. If you are totally new to this you might want to read some SQL-tutorials before you start messing with the database ;)

Think that's wise advice mate.. will do. Thanks :)
 
i get this error
Code:
[SQL] DELETE FROM p USING profile p JOIN survivor s ON s.unique_id = p.unique_id WHERE s.last_updated < now() - INTERVAL 1 MONTH;
[Err] 1451 - Cannot delete or update a parent row: a foreign key constraint fails (`test`.`cust_loadout_profile`, CONSTRAINT `cust_loadout_profile_ibfk_22` FOREIGN KEY (`unique_id`) REFERENCES `profile` (`unique_id`))
 
Disabling foreign key checks will certainly work but is not recommended. The foreign key restraints are there for a reason. Doing it that way may leave orphan rows in instance_deployable. The SQL in #2 is the correct way to do it.
 
Back
Top