So the main table uses a field opl_comp and the disk table uses disc_id as the column names correct?
The first thing you need to do is make sure that the datatypes between these two columns match identically. Same datatype, same encoding, same length. Once those match, you can issue an alter command for the constraint. I'll call the confirming disk id (the one you prepopulate) table confirmedCodes and the main table main. I'm so creative
ALTER TABLE confirmedCodes ADD CONSTRAINT fk_disc_id_main_opl_comp FOREIGN KEY (disc_id) REFERENCES main(opl_comp) ON DELETE RESTRICT ON UPDATE CASCADE
Note that to enforce these constraints, you need to be using the INNODB database engine type. The MyISAM will accept the constraint, but will not enforce it.
ON DELETE and ON UPDATE are optional. By default they should fall to RESTRICT. These are used for cascading options. So if I have related entries to the game code AAA in the confirmedCodes.disc_id to the main.opl_comp, than if I change AAA to GGG, every entry within the main.opl_comp will update to GGG without needing a separate query. The RESTRICT on the delete means I cannot delete AAA if there are entries using AAA within the main.opl_comp. If you want, you can also cascade deletes. The only one I'd suggest not using is SET NULL which would set the corresponding entries to null.