I have one table that I had called equipment, and 8 other tables that I had called equipment_child1 and so on until equipment_child8.
The commom field between all that tables is cod_equip, with this field I ‘m able to identify all my child equipment tables with equipment parent table.
I need to delete data from equipment when the equipment is moved, but I need to delete data in all my tables equipment_child1 to equipment_child8.
then I remenber I had used DELETE CASCADE in innoDB engine, but now I’m using MyISAM engina, is that a problem?
Any help, will really clarify …
Yes. Simply you can’t with that engine.
edit. You could write a trigger that once you delete a record in your table delete all child records in all the other tables.
Ok. I wrote you an example:
Hope that it helps.
edit. Obviously it works even if you delete more id from table1 at the same time: