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