Increment of field default value in mysql/php -


$saa = "update  aspirantdt set vote = 'vote'+1 'post_id' = '$id' "; 

when check database value didnt increase. me out.

yuo have sintax mistake in update query, using quotest instead of backtick. use backticks column names , quotes values try change follow

$saa = "update  `aspirantdt` set `vote` = (`vote`+1) `post_id` = '".$id."' "; 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -