I want to UPDATE a database column by concatenating a string with a function. let's say that I have two columns sum_likes_c1 and sum_likes_c2 and I have a function called $class has 1 or 2 value
so I want the query to update the column based on $class value
my current code (not working):
if (isset($function)) {
    $class = 1;
    } else $class = 2;
    $update_likes = mysqli_query($con, "UPDATE posts SET CONCAT(sum_likes_c,'$class') ='$total_likes' WHERE id='$post_id'");
Any help would be appreciated
 
     
    