Found the issue with the parts not updating: the part where the above select says "(SELECT id FROM" should have read "(SELECT parts_id FROM"