title: PHP MySQL INSERT data from another table using the where clause and insert unique values to the same rows
body: <p>I want to insert data from one table into another where one field equals another in both tables. So far this works. The problem is, I also need to insert additional data into those same rows that is not included on the first table. </p>
  
  <hr>
  
  <pre><code>//enter rows into database 
  foreach($_POST['sku'] as $row=&gt;$sku)
  { 
  //this is the data that needs to be added to the table 
  $item_sku=$sku;
  $image="/$item_sku.jpg";
  $small_image="/$item_sku.jpg"; 
  $thumbnail="/$item_sku.jpg";
  
  //currently this is what is working to import data from one table to the other
  $sql= "INSERT INTO magento_import (sku, description, price) 
         SELECT PR_SKU, PR_Description, PR_UnitPrice
         FROM products 
         WHERE PR_SKU = '$sku'";
  
  //I need something here to add the above variables to the same row where PR_SKU = '$sku'
  
  if (!mysql_query($sql))
  {
  die('Error: '.mysql_error()); 
  }
  echo "$row record added";
  }
  </code></pre>
  
  <p>The columns for the missing data on magento_table are called 'image', 'small_image', and 'thumbnail'. This is simple a hack to put data from an old product table into a new product  table, export as a CSV, and run a profile in Magento. I don't need to worry about SQL injections. It's something I'm running off of a local machine. I'm trying to avoid as much manual data entry as possible while switching products over to a new ecommerce system. Thanks for any help you can give.</p>