php - SELECT AND THEN UPDATE COUNT number mysqli -
i'm trying rows table products, , update product_views too, @ same time,
select * `product` `id` = '26' , `product_enable`= '1' , update `product` set `product_views` = product_views+1;
this code doesn't work, think can explain want do,... there way this, think making in 1 query should system right?
so, help
you did wrong way :
update `product` set `product_views` = (select product_views `product` `id` = '26' , `product_enable`= '1')+1;
Comments
Post a Comment