UPDATE `HostingBonuses` SET `UserID` = (SELECT `UserID` FROM `Contracts` WHERE `HostingBonuses`.`ContractID` = `Contracts`.`ID`);