我想在會議結束後7天輸出一些會議記錄。我只在以下代碼中插入了一條致命錯誤消息。SQL錯誤:'致命錯誤'
<?php
$id = $_GET['meeting_id'];
$from = date('Y-m-d', strtotime($row['date_update'] . '-7 days'));
$result = $this->db->get ('SELECT * FROM Meetings INNER JOIN Minutes ON Minutes.meeting_id = Meetings.meeting_id WHERE Rooms.date >= "' . $from . '" AND Rooms.date <= NOW() AND Minutes.meeting_id = $id')
or die(mysql_error());
if (mysql_num_rows($result) == 0) {
echo '<h3>There Arent Any Minutes For This Meeting Yet</h3>';
} else {
while($info = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td><br/>" .'Title: '. $info['title']." </td>";
echo "<td><br/><br/>" .'Subject: '. $info['subject']. "</td>";
echo "<td><br/><br/>" .'Next Subject: '. $info['next_subject']."</td>";
echo '<br/><br/><a href="attendees.php?meeting_id=' . $info['meeting_id'] . '" target="_blank">Attendees</a>';
echo ' | <a href="apologies.php?meeting_id=' . $info['meeting_id'] . '" target="_blank">Apologies</a>';
}
}
echo "</tr>";
echo "</table>";
?>
錯誤消息我得到如下:
Fatal error: Using $this when not in object context in E:\webareas\hj942\CW\meetings\conference\viewminutes.php on line 59
線59是在$結果查詢。
有人嗎?