I want to list and then delete orphaned records in a products table. By orphaned, I mean a product that is not in any categories, orders, favorites lists, etc.
With InnoDB, I could just use "ON DELETE RESTRICT" to delete a record that has no foreign key relationships. But the product table needs full text search capability, so I need the MyISAM engine. How do I simulate "ON DELETE RESTRICT" foreign key check using the MyISAM engine? Should I just check each referenced table sequentially for the parent id? Is there a SQL join that would simulate the on delete restrict? Something like: Delete record from table left join child table where parentid != childid? Should I split the full text search product table into an innodb table for the keys and a myisam table for the text? Other techniques? Thanks, Cliff _______________________________________________ New York PHP Community MySQL SIG http://lists.nyphp.org/mailman/listinfo/mysql NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
