本文整理汇总了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!";