来自数据库的信息未显示

时间:2012-01-05 16:34:03

标签: php mysql

我试图从名为“议程”的表格中获取所有信息,以便在我的网页上显示时已被批准但我遇到了麻烦

  <?php
$agenda_id = $_GET['agenda_id'];
include 'library/connect.php';
$result = mysql_query("SELECT * FROM agenda WHERE approval = 'approved' AND agenda_id = '$agenda_id'");

echo "<table border='1'><tr><th>Subject</th><th>Duration</th></tr>";

while($row = mysql_fetch_array($result))
{
        echo "<tr>";
        echo "<td>" . $row['subject']. "</td>";
        echo "<td>" . $row['duration']. "</td>";



}
echo "</tr>";
echo "</table>";
include 'library/closedb.php';
?>

1 个答案:

答案 0 :(得分:3)

echo "</tr>";进入你的while循环。