I am trying to implement an update multiply rows with a single mysqli query. What i have done so far is:
$sql="INSERT INTO history_table (image_canvas_channel, start_image_time, end_image_time) VALUES ($image_canvas_channel , $start_image_time, $end_image_time) ON DUPLICATE KEY UPDATE start_image_time = IF(image_canvas_channel = $image_canvas_channel, start_image_time = $start_image_time,) , end_image_time = IF(image_canvas_channel = $image_canvas_channel, end_image_time = $end_image_time,)";
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') , end_image_time = IF(image_canvas_channel = 152, end_image_time = 363365,)' at line 1.