I would like the current value in database in column mass_reach to be added with the new value under variable name $newmass (a constant figure). I created a double barrel loop below to extract what value is current then add it and update the value in second loop but cant seem to get this going.
if(isset($_POST['mass_reach'])){
$massreach = $_POST['mass_reach'];
foreach ($massreach as $massreach_id) {
$query4 = "SELECT mass_reach FROM coaches WHERE id='{$massreach_id}'";
$result4 = mysqli_query($con, $query4);
$query2 = "UPDATE coaches SET mass_reach='{$newmass}'+'{$result4}' WHERE id='{$massreach_id}'";
$result = mysqli_query($con, $query2);
}
}
I am getting the error: I get the error: Catchable fatal error: Object of class mysqli_result could not be converted to string in line 8 ie
$query2 = "UPDATE coaches SET mass_reach='{$mass}'+'{$result4}' WHERE id='{$massreach_id}'";