i am want to update my database where in i have to use the current value (of the column to be updated) do some subtraction to it and then update with the subtracted value
my table is
quantityinhand
qid INT (PK)
itemId INT (FK)
quantity INT
my query is
"Update quantityinhand SET quantity=quantity-".$qty." where itemId=".$itemId;
here $qty is the quantity to be subtracted and $itemId is the item Id whoose quantity is to be updated
How to write this query in ZEND framework
please help Thanks