title: PHP|MYSQL Query : compare two table fields and insert|overwrite value of one field if matches
body: <p>I've got 2 tables :</p>
  
  <ul>
  <li><p><code>jos_tempcsv</code>, which contains among others the following field: <code>Category of goods</code></p></li>
  <li><p><code>jos_categories</code>, which contains among others the following fields: <code>Category_id</code>, <code>slug</code></p></li>
  </ul>
  
  <p>I would like to create the following query:</p>
  
  <p>I've got a table called <code>jos_tempcsv</code> which contains a field called <code>Category of goods</code>. This field contains alphanumeric values that needs to be changed in a numeric value.</p>
  
  <p>I need to compare the value of the <code>Category of goods</code> field of the <code>jos_tempcsv</code> table with the value of the <code>slug</code> field of the <code>jos_categories</code> table. </p>
  
  <p>If comparison matches, then I would like to insert the value contained in the <code>Category_id</code> field of the <code>jos_categories</code> table into the <code>Category of goods</code> field of the <code>jos_tempcsv</code> table (it should overwrite the initial value with a numeric value).</p>