sorry I know this is more a mysql question than a PHP one but I couldn't find what I was looking for on mysql.com
Is is possible to do calculation in an update query where you grab values from different fields within that same record?
e.g.:
we have the following fields:
id,price,tax,total
I want to be able to do something like this:
update table set total = (price * tax) where id = $id
obviously I'm not able to do this, just wondering if there is a quick way of doing this instead of selecting the row, getting the value passing it to a variable then plug it into the update query.
Any ideas?
thanks
Autumnnn