File: /var/www/nclive/technc/admin_reminder_messages.php
<?php
include 'config.php';
date_default_timezone_set("Asia/Calcutta");
$curDate = date('Y-m-d'); // add 5 hrs 30 min in curr time
$query = "SELECT el.display_text, el.display_text_dates, e.exam_name, ee.name, el.date FROM sp_exam_links AS el LEFT JOIN sp_exam AS e on e.exam_id=el.exam_id LEFT JOIN sp_exam_entity AS ee on ee.id=el.entity_id WHERE FIND_IN_SET('$curDate',el.date ) AND el.status='1' ";
$sql = $db->prepare($query);
$sql->execute();
?>
<table class="table table-striped">
<thead class="thead-dark">
<tr>
<td scope="col"> S.No </td>
<td scope="col"> Exam Name </td>
<td scope="col"> Entity </td>
<td scope="col"> Display Text </td>
<td scope="col"> Date </td>
</tr>
</thead>
<tbody>
<?php $i=1;
if ($sql->rowCount() > 0) {
while ($row = $sql->fetch()) { ?>
<tr scope="row">
<td><?php echo $i; ?></td>
<td><?php echo $row['exam_name']; ?></td>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['display_text']; ?></td>
<td><?php echo str_replace(","," To ",$row['date']); ?></td>
</tr>
<?php } } else { ?>
<tr scope="row">
<td colspan="5">No Data</td>
</tr>
<?php } ?>
</tbody>
</table>