32 lines
1.0 KiB
PHP
32 lines
1.0 KiB
PHP
![]() |
<?php
|
||
|
include ('includes/config/config.php');
|
||
|
include ('log_entry.php');
|
||
|
|
||
|
$modified_by = $_REQUEST['modified_by'];
|
||
|
$comm_date = $_REQUEST['comm_date'];
|
||
|
|
||
|
$query = "select cd.shift_details_id, cd.communication_id, c.com_item, cd.details, cd.remarks from communication c LEFT join communication_details cd on c.communication_id = cd.communication_id left join shift_status_details ssd on ssd.shift_details_id = cd.shift_details_id left join shift_status ss on ss.shift_status_id = ssd.shift_id where cd.modified_by = '" . $modified_by . "' and comm_date = '" . $comm_date . "' ";
|
||
|
|
||
|
|
||
|
error_log("query:::" . $query);
|
||
|
|
||
|
if (!$result = @mysqli_query($conn, $query)) {
|
||
|
error_log("view query error: " . mysqli_error($conn));
|
||
|
exit(mysqli_error($conn));
|
||
|
}
|
||
|
|
||
|
$data = array();
|
||
|
|
||
|
if (mysqli_num_rows($result) > 0) {
|
||
|
while ($row = @mysqli_fetch_assoc($result)) {
|
||
|
$data[] = $row;
|
||
|
}
|
||
|
} else {
|
||
|
$data['status'] = 200;
|
||
|
$data['message'] = "Data not found!";
|
||
|
error_log($data['message']);
|
||
|
}
|
||
|
|
||
|
error_log(print_r($data, true));
|
||
|
echo json_encode($data);
|