My situation is that I have two tables where I join them. What I need to do is when I delete a record on the "primary" (do you call it that?) table, the other table's records, that are linked to the primary tables record, should be deleted aswell.
I've read in another thread that you can do that in MySQL, but only on InnoDB tables. I have tried ON DELETE CASCADE, but I get the message: Error creating the foreign key.
Check these information before creating a foreign key
-both tables should have an Index for the columns specified
-the size and the signedness of integer types has to be the same
-defined ON DELETE/ON UPDATE SET TO NULL but the column is defined as NOT NULL.
I'm using DBManager Professional 2.3.0, freeware edition.
CREATE TABLE `tblindexbyobject`
`indexId` INTEGER (255) UNSIGNED NOT NULL DEFAULT 0,
`adId` INTEGER (255) UNSIGNED NOT NULL DEFAULT 0