我目前正在创建一个在线预订系统。
如何一次执行多个查询?
我已经在使用 mysqli_muti_query。我要执行三个查询。
<?php
$sql = "INSERT INTO db (name,picuploc,lname,pnumber,age,email,address,city,zipcode,ticketid,pickuptime,dropofftime,dropoffloc,vehicle,plateno,totalprice,date_registered) VALUES ('$first','$pickuploc','$lname','$pnumber','$age','$email','$address','$city','$zip','$ticket','$pickup','$dropoff','$dropoffloc','$car','$plate','$all', NOW());";
$sql .= "UPDATE vehicles set quantity = quantity - $age WHERE vehicle = '$car' AND parent = '$ye' ";
$sql .= "UPDATE vehicles set status = '$un' WHERE plateno = '$plate' "; ?>