//RETRIEVE ALL NEW MESSAGE BOARD COMMENTS ADDED TO USER'S PROJECTS IN THE LAST SEVEN DAYS $result = mysql_do("SELECT * FROM comments WHERE project_id IN ({$project_list}) AND created > DATE_SUB(CURDATE(),INTERVAL 7 DAY) ORDER BY `created` DESC LIMIT 20;"); while ($query_data = mysql_fetch_array($result)) { if ($counter == 0) { ?> <h3>Comments in Your Projects</h3> <div class="recentComments"> <?php } // Probably needs optimizing. $this_project = new Project(); $this_project->get($query_data['project_id']); if ($query_data['evidence_id'] > 0) { $this_evidence = new Evidence(); $this_evidence->get($query_data['evidence_id']); } if ($query_data['hypothesis_id'] > 0) { $this_hypothesis = new Hypothesis(); $this_hypothesis->get($query_data['hypothesis_id']); } $this_user = new User(); $this_user->get($query_data['user_id']); $counter++; ?> <div class="recentComment"> <p class="comment"><a href="<?php echo $base_URL; ?>