I am trying to update multiple rows on one table using MySQL. I have found that this is possible but I am trying to increment the value of the comments column by a given amount, however trying to increment it by 1 actually increments it by 3.
$increment = 1;
('UPDATE articles
SET comments = CASE
WHEN article_id in(1, 2) THEN comments + ' . $increment . '
END');
Any ideas?
Thanks,
Matt
Try this: