first commit
This commit is contained in:
25
backend/ride/driver_order/getOrderCancelStatus.php
Normal file
25
backend/ride/driver_order/getOrderCancelStatus.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../../connect.php';
|
||||
|
||||
$order_id = filterRequest("order_id");
|
||||
|
||||
$sql = "SELECT `id`, `driver_id`, `order_id`, `created_at`, `status` FROM `driver_orders` WHERE `order_id` = :order_id";
|
||||
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindParam(":order_id", $order_id, PDO::PARAM_STR);
|
||||
$stmt->execute();
|
||||
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($row) {
|
||||
echo json_encode([
|
||||
"status" => "success",
|
||||
"data" => $row
|
||||
]);
|
||||
} else {
|
||||
echo json_encode([
|
||||
"status" => "failure",
|
||||
"message" => "No driver order data found for the specified order_id"
|
||||
]);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user