You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
39 lines
1.2 KiB
<?php
|
|
error_reporting(0);
|
|
include '../DB.php';
|
|
try {
|
|
$conn = new DB();
|
|
|
|
if ($conn) {
|
|
$sql = "SELECT
|
|
DISTINCT
|
|
latitude,
|
|
longitude,
|
|
facilitynum,
|
|
facilityno,
|
|
address,
|
|
buildcompany,
|
|
marchintotime,
|
|
estimatedcompletiontime,
|
|
process,
|
|
status,
|
|
create_at
|
|
FROM worksite
|
|
WHERE (maintainance_facility_no IS NULL
|
|
OR maintainance_facility_no = '')
|
|
ORDER BY create_at DESC ";
|
|
$result = $conn->getAll($sql);
|
|
for ($i = 0; $i < sizeof($result); $i++) {
|
|
$facilityno = $result[$i]["facilityno"];
|
|
$installsql = " SELECT *
|
|
FROM wipinstallation
|
|
WHERE facilityno = '$facilityno'
|
|
ORDER BY id DESC ";
|
|
$installinffo = $conn->getAll($installsql);
|
|
$result[$i]['installschedule'] = $installinffo;
|
|
}
|
|
echo json_encode($result);
|
|
}
|
|
} catch (Exception $e) {
|
|
die($e->getMessage());
|
|
}
|
|
|