I'm building a point of sale software in php
So I've saved the items in the cart in a temporary table called tempsales, then update all the quantity of items with the new quantities. Just one query, using the code below which gives me subquery, returns:
More than one row error
UPDATE items SET quantity = quantity -
(SELECT quantity FROM tempsales ORDER BY id ASC)
WHERE id IN
(SELECT id FROM ORDER BY I'd ASC)