I am using raw update query in my project, I have to update a column with some value which is dynamic and comes from a function and it is stored in a variable.But when i run the following update query i am getting an error:
UPDATE shop_cartitem SET total_price =update_amt WHERE cart_id = %s", [cart_abj.id]
my error 1054, “Unknown column ‘update_amt’ in ‘field list'”)
But i run with a static value UPDATE shop_cartitem SET total_price =100 WHERE cart_id = %s", [cart_abj.id] then it execute correctly.
So please tell me ow i can run this update query with a dynamic variable.
Thanks.
It should be