I do not have a clue where to start in turning the follow MySql query into a php script can anyone help. I am
CheersUPDATE catalog_product_entity_media_gallery ri, downloadable_link rri
SET rri.image_id = ri.value
WHERE rri.product_id = ri.entity_id