i want to multiply my db column( ".$subject_column."_theory) value with 10/7( my subject total is 70, and i want to convert it to 100 for finding the grade.) also after multiplication the result must be rounded off
$update_subject_statement4 = "UPDATE ".$track_table_name."
SET `".$subject_column."` =IF(`".$subject_column."_theory`='ab',0,`".$subject_column."_theory`) WHERE
evaluation_division="."'$eval_div' AND evaluation_config_id = ".$config_id." AND stream_index = ".$stream_index;
$additional_sum_update_query = $this->db->query($update_subject_statement4);
$update_subject_statement4 = "UPDATE ".$track_table_name."
SET `".$subject_column."` = ROUND(IF(`".$subject_column."_theory`='ab',0,`".$subject_column."_theory`) * 7 / 10)
WHERE
evaluation_division="."'$eval_div'
AND evaluation_config_id = ".$config_id."
AND stream_index = ".$stream_index;
$additional_sum_update_query = $this->db->query($update_subject_statement4);
1st: we multiplied your value with 7/10
IF(".$subject_column."_theory
='ab',0,".$subject_column."_theory
) * 7 / 10
2nd: we rounded it
ROUND( IF(".$subject_column."_theory
='ab',0,".$subject_column."_theory
) * 7 / 10 )