SELECT n.* FROM `newsstories` n where n.bss_id not in (select s.bss_id from systems s) ORDER BY `n`.`bss_id` ASC This shows 94 such stories. These should be fixed. Then add a foreign key constraint on bss_id on newstories, linking to bss_id on systems.
SELECT n.* FROM
newsstoriesn where n.bss_id not in (select s.bss_id from systems s) ORDER BYn.bss_idASCThis shows 94 such stories. These should be fixed.
Then add a foreign key constraint on bss_id on newstories, linking to bss_id on systems.