Mantasgl wrote:
Hi

I have a form in which I write a price and i want that prices of my products
could be increased by that form value.

A simple query would look like "UPDATE product SET price = price +
$formvalue['price']"

This works in phpmyadmin.

So how could I write such a query with zend db?
$db->update('product', $columnValuesArray);

Or
$result = $db->query("UPDATE product SET price = price +$formvalue['price']");
Where $db is your Zend_Db adapter.



--

With warm regards,
Sudheer. S
Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, 
Personal: http://sudheer.net

Reply via email to