本文整理匯總了PHP中DB_Functions::insertVaccineSchedule方法的典型用法代碼示例。如果您正苦於以下問題:PHP DB_Functions::insertVaccineSchedule方法的具體用法?PHP DB_Functions::insertVaccineSchedule怎麽用?PHP DB_Functions::insertVaccineSchedule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DB_Functions
的用法示例。
在下文中一共展示了DB_Functions::insertVaccineSchedule方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
// receiving the post params
$Br_Id = $_POST['br_id'];
$Vac_Child_Id = $_POST['vac_child_id'];
$Vac_Name = $_POST['vac_name'];
$Vac_Doc_Id = $_POST['vac_doc_id'];
$Vac_App_Date = $_POST['vac_app_date'];
$Vac_App_Time = $_POST['vac_app_time'];
$Vac_Ward_No = $_POST['vac_ward_no'];
// check if appointment exists
if ($db->isVaccineSchedule($Vac_Child_Id, $Vac_App_Date, $Vac_App_Time)) {
$response["response"] = 0;
$response["message"] = " Appoinment already exists";
echo json_encode($response);
} else {
// create a new user$Cust_Name, $Cust_Email, $Cust_Phone,$Cust_Address,$Cust_City,$Cust_State
$user = $db->insertVaccineSchedule($Br_Id, $Vac_Child_Id, $Vac_Name, $Vac_Doc_Id, $Vac_App_Date, $Vac_App_Time, $Vac_Ward_No);
// Vaccination Scheduled successfully
if ($user) {
$response["response"] = 1;
$response["message"] = "Vaccination Scheduled.";
echo json_encode($response);
} else {
// Vaccination Scheduling failed
$response["response"] = 2;
$response["message"] = "Unknown error occurred in registration!";
echo json_encode($response);
}
}
} else {
$response["response"] = 3;
$response["message"] = "Required parameters missing!";