20 lines
539 B
PHP
20 lines
539 B
PHP
<?php
|
|
include('includes/config/config.php');
|
|
|
|
$sql = "SELECT * FROM notice WHERE expiry_date >= CURDATE() AND trigger_date <= CURDATE() AND status IN ('incomplate','pending')";
|
|
$result = mysqli_query($conn, $sql);
|
|
$data = array();
|
|
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
$data[] = array(
|
|
"notice_details" => $row['notice_details'],
|
|
"issued_by" => $row['issued_by'],
|
|
"issued_to" => $row['issued_to'],
|
|
"status" => $row['status']
|
|
);
|
|
}
|
|
|
|
$response = array("data" => $data);
|
|
// error_log('notices');
|
|
echo json_encode($response);
|