Skip to content
Snippets Groups Projects
Commit 98b4b8f2 authored by Husnulzaki Wibisono Haryadi's avatar Husnulzaki Wibisono Haryadi
Browse files

Fix update total score and votes

parent a0ed479c
1 merge request!45OneHundred - 13515005 - Husnulzaki Wibisono Haryadi
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment