A while ago @Richard Harris gave a great answer for a similar question, but I believe my situation is slightly different.
As you can see I have 2 consecutive UPDATE statements targeting the same table and fields but with different SET and WHERE clauses.
$this->db->query("
UPDATE user_profiles
SET reputation = reputation + 15
WHERE user_id = $answer_author_id;
");
$this->db->query("
UPDATE user_profiles
SET reputation = reputation + 2
WHERE user_id = $user_id;
");
I wonder if this can be combined into a single query, or if this requires further normalization. Also, are these consecutive queries too inefficient? If not, I wouldn't bother trying to combine into a single query.
Your thoughts on this are much appreciated.