diff --git a/order/order_handler.php b/order/order_handler.php index b676fbd7718efb45aeaf011dfcc7c92292d626e8..becc1c26ea1f893e4a4d23b5f0ad55e47f14f32e 100644 --- a/order/order_handler.php +++ b/order/order_handler.php @@ -13,6 +13,11 @@ INSERT INTO `order`(dest_city, pick_city, score, comment, driver_id, cust_id, date) VALUES ('".$dest_city."', '".$pick_city."', '".$score."', '".$comment."', '".$driver_id."', '".$cust_id."', '".$date."') ") or die(mysqli_error($con)); + $modify1_driver_query = mysqli_query($con," + UPDATE `driver` + SET votes = votes + 1, total_score = total_score + $score + WHERE driver_id = '$driver_id' + ") or die(mysqli_error($con)); mysqli_close($con);