-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnotontimepackage.php
More file actions
23 lines (21 loc) · 851 Bytes
/
notontimepackage.php
File metadata and controls
23 lines (21 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
include "index.php";
// fetch records
$sql = "SELECT `package`.`package_id` , `package`.`package_type` ,`customer`.`name` , `time`.`schedule_time` , `time`.`end_time` , `transportation`.`type_name`
FROM `package`
LEFT JOIN `payment` ON `package`.`package_id`=`payment`.`package_id`
LEFT JOIN `time` ON `time`.`package_id`=`package`.`package_id`
LEFT JOIN `customer` ON `payment`.`customer_id`=`customer`.`customer_id`
LEFT JOIN `transportation` ON `transportation`.`transportation_id`=`package`.`transportation_id`
WHERE `time`.`end_time` > `time`.`schedule_time`";
$result = mysqli_query($con, $sql);
while ($row = mysqli_fetch_assoc($result)) {
$array[] = $row;
}
$dataset = array(
"echo" => 1,
"totalrecords" => count($array),
"totaldisplayrecords" => count($array),
"data" => $array
);
echo json_encode($dataset);