Disable MySql Foreign Key Checks Temporarily

Fighting with numerous tables in MySql and all I want to do is clear a few records, but the foreign key checks are preventing deletes.

Disable the foreign key checks temporarily to get around this to fix this

SET FOREIGN_KEY_CHECKS = 0;
delete from |ChildTable| where |ParentTableId| > |LastInsertId|;
delete from |ParentTable| where |ParentId| > |LastInsertId|;
SET FOREIGN_KEY_CHECKS = 1;