title: Need to archive data on successful cart transaction using Update SQL JOIN
body: <p>I need to archive a product when it has been bought in the storefront. I`m thinking about doing a SQL JOIN but not sure...</p>
  
  <p>Is this the query I need to run?</p>
  
  <pre><code>  UPDATE product 
    INNER JOIN cart on cart.product_id = product.id
    SET product.archive = 1
  </code></pre>
  
  <p><strong>cart</strong></p>
  
  <pre><code>id (int)
  product_id (int)
  quantity (int)
  </code></pre>
  
  <p><strong>product</strong></p>
  
  <pre><code>id (int)
  name (varchar 45)
  price (decimal 10,2)
  quantity (int)
  image (varchar 255)
  archive (tinyint) default 0
  </code></pre>