title: Updating with a JOIN
body: <p>how do i fix my query? I need to update my table to add inventory to the inventory table which is different from the order table</p>
  
  <p>currently here is my query.</p>
  
  <pre><code>$qry = "UPDATE inventory 
          SET inventory.prod_quantity = inventory.prod_quantity + order_detail.quantity
          FROM inventory
          RIGHT JOIN order_detail on inventory.id=order_detail.orderid 
          WHERE inventory.id='{$_REQUEST['productid']}' ";
  </code></pre>
  
  <p>but it doesnt work. I dont know if i did it wrong or something. it wont add and i think my query format is wrong, im new with joins so an explanation would be nice. </p>
  
  <p>productid is the same as id in inventory table.</p>
  
  <p>Thank you. </p>