本文整理匯總了PHP中DB_Functions::isAmbulanceSchedule方法的典型用法代碼示例。如果您正苦於以下問題:PHP DB_Functions::isAmbulanceSchedule方法的具體用法?PHP DB_Functions::isAmbulanceSchedule怎麽用?PHP DB_Functions::isAmbulanceSchedule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DB_Functions
的用法示例。
在下文中一共展示了DB_Functions::isAmbulanceSchedule方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
$db = new DB_Functions();
// json response array
//$response = array("error" => FALSE);
if (isset($_POST['br_id']) && isset($_POST['ambulance_id'])) {
// receiving the post params
$Br_id = $_POST['br_id'];
$Ambulance_Type = $_POST['ambulance_type'];
$Ambulance_Id = $_POST['ambulance_id'];
$Pat_Name = $_POST['pat_name'];
$Address = $_POST['address'];
$Date = $_POST['date'];
$Time = $_POST['time'];
$Am_Sch_Id = $_POST['am_sch_id'];
if ($_POST['am_sch_id'] == "") {
// check if patient already exists
if ($db->isAmbulanceSchedule($Ambulance_Id)) {
// Bed already allocated
$response["response"] = 0;
$response["message"] = $Ambulance_Id . " 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->insertAmbulanceSchedule($Br_Id, $Ambulance_Type, $Ambulance_Id, $Pat_Name, $Address, $Date, $Time);
if ($user) {
// Bed allocated successfully
$response["response"] = 1;
$response["message"] = "Ambulance Scheduled.";
echo json_encode($response);
} else {
// Bed allocation failed
$response["response"] = 2;