I'm having trouble adding 1 to a column value in MySQL. I've used backticks on the column name and value isn't incrementing. Here is my query:
$update = $connectdb->prepare("UPDATE `strings` SET posted=posted, `response-comment`=`response-comment` + 1 WHERE `id`=?");
$update->execute(array($id));
Why isn't my query working? The value $id
is correct, the column response-comment
should increase by 1.