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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -