Cleanup orphaned records
DELETE FROM Line_Items 
WHERE Line_Items.Order_Number -- this should be an ON DELETE CASCADE FK.
NOT IN 
(
  SELECT id 
  FROM Orders
); -- not tested, don't have running system, but this or similar should work.


Note: Don't call a table "Order" - makes debugging difficult and system non-portable. Personally, I'm against the use of plural names for tables - I usually call it System_Order (or Shop_Order) or similar.