title: Magento: Populate column data from another table
body: <p>I'm using Magento Community 1.6.2.</p>
  
  <p>Due to a bad import, my media positions are all screwed up.</p>
  
  <p>To repair I would like to export catalog_product_entity_media_gallery_value and edit the <strong>position</strong> field. Unfortunately catalog_product_entity_media_gallery_value shows only value_id as an identifier to which product/image is associated. </p>
  
  <p>catalog_product_entity_media_gallery (on the other hand) contains the field <strong>value</strong>, which is the image path. It also contains the field value_id.</p>
  
  <p>To prep I added the <strong>value</strong> column to catalog_product_entity_media_gallery_value</p>
  
  <p><strong>Now to my problem:</strong></p>
  
  <p>I would like to join the new <strong>value</strong> field I created in <strong>catalog_product_entity_media_gallery_value</strong> with the info from <strong>catalog_product_entity_media_gallery</strong> using the value_id to associate the right value with its corresponding <strong>value_id</strong>.</p>
  
  <p>Help....</p>