update history2_detail set duration='$val_dur',up='1',resp_time=(resp_time + $resptime),ave_resp_time=(ave_resp_time + $ave_last),cum_up=(cum_up + $cum_up),compare_ratio='$comparenow',banner_result='$tmp_result' where id='$id' AND datenow=$datenow";
it seems it doesnt update the history2_details
the ave_resp_time is the same as previous