<div id="desc_<?php echo $task_details['task_id']; ?>" class="descbox box">
<b>Task Description:</b>
<?php echo $task_details['detailed_desc'] ? $task_details['detailed_desc'] : "<p>No Description</p>"; ?>
+<?php
+ global $db;
+ $sql = $db->Query('SELECT date_added,comment_text FROM {comments} WHERE task_id = ? ORDER BY date_added DESC LIMIT 1',
+ array($task_details['task_id']));
+ if ($db->countRows($sql) == 1) {
+ $row = $db->FetchRow($sql);
+ if (strlen($row['comment_text'])) {
+ echo "<hr>" . Filters::noXSS(formatDate($row['date_added'], true)) . $row['comment_text'];
+ }
+ }
+?>
</div>
</tr>
<?php endforeach; ?>