24 lines
884 B
PHP
24 lines
884 B
PHP
<?php
|
|
include('includes/config/config.php');
|
|
include('log_entry.php');
|
|
$med_issue_id = $_REQUEST['issue_log_id'];
|
|
|
|
$query = "select a.*,b.issue_point_id,date_format(b.date_of_issue,'%d-%m-%Y %H:%s:%i') as issue_date,b.comments as comment_log,c.item_name from direct_medicine_issue_log_details a left join direct_medicine_issue_log b on a.issue_log_id=b.issue_log_id left join tbl_items c on a.item_id=c.item_id where a.issue_log_id= '" . $med_issue_id . "' ";
|
|
error_log("select query" . $query);
|
|
if (!$result = @mysqli_query($conn, $query)) {
|
|
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);
|