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
currently here is my query.
$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']}' ";
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.
productid is the same as id in inventory table.
Thank you.