【发布时间】:2015-01-12 09:27:33
【问题描述】:
我实际上是在尝试在引导表中显示我的 mysql 表的内容。
我可以看到内容,但它只显示第一个内容,其他内容不在表格内。哪里错了?
实际的样子:
我的表.php
<?php
include('config/mysql.php');
$result = mysql_query("SELECT * FROM streams");
echo mysql_error();
?>
<link rel="stylesheet" href="views/extra.css" />
<table class="tablesorter" cellspacing="0" >
<thead>
<tr>
<th class="header">ID</th>
<th class="header">Name</th>
<th class="header">Port</th>
<th class="header">Options</th>
</tr>
</thead>
<tbody>
<?php while ($row = mysql_fetch_array($result)) { ?>
<tr>
<td bgcolor="#D1FFC2"><?php echo $row["id"] ?></td>
<td bgcolor="#D1FFC2"><?php echo $row["streamname"] ?></td>
<td bgcolor="#D1FFC2"><?php echo $row["streamport"] ?></td>
<td bgcolor="#D1FFC2">Debug- Delete- Edit</td>
</tr>
</tbody>
</table>
<?php } ?>
【问题讨论】:
标签: mysql sql twitter-bootstrap html-table