/*UPDATEREVISION*/
INSERT INTO site (`setting`, `value`, `updateddate` ) VALUES ('dbversion', '$Rev: 4240 $', now()) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`), updateddate=now();

/*PATCHHERE*/
UPDATE releases
INNER JOIN tvinfo ON tvinfo.ID = releases.tvinfoID
SET releases.imdbID = tvinfo.imdbID
WHERE tvinfo.imdbID is not null and releases.imdbID is null and releases.tvinfoID is not null and releases.tvinfoID != -1 and categoryID like '5%';