>>>> 2011/11/06 13:56 +1000, Edward avanti >>>> #1451 - Cannot delete or update a parent row: a foreign key constraint fails (`vmail`.`domain_admins`, CONSTRAINT `domain_admins_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `virtual_domains` (`id`) ON DELETE CASCADE) <<<<<<<< In table domain_admins there is the constraint that field domain_id refers to table virtual_domains s field id . Therefore, to delete a record from virtual_domains it is needful first to delete from domain_admins the record with domain_id equal to id . After that it will let one delete the record from virtual_domains .
It will not only not delete but also not change id if in table domain_admins there is a record with domain_id equal to id . -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org