1
数据表显示数据库的内容,但仍显示错误消息:表中没有可用数据。 我如何解决这个问题,只显示数据没有错误消息表中没有可用数据,但显示数据库中的数据
<table name= "displaycase" id="example1" class="table table-bordered table-striped" method = "post">
<thead>
<tr>
<th>Case Title</th>
<th>Court</th>
<th>Dockent Number</th>
<th>Nature</th>
<th>Actions Taken</th>
<th>Status</th>
<th>Due Date </th>
</tr>
</thead>
<tbody>
<tbody class = "searchable">
<?php
if (mysql_num_rows($result) > 0) {
// output data of each row
while ($row = mysql_fetch_assoc($result)) {
echo
"</td><td>" . $row["CaseTitle"] .
"</td><td>" . $row["Court"] .
"</td><td>" . $row["docketNum"] .
"</td><td>" . $row["nature"] .
"</td><td>" . $row["actionsTaken"] .
"</td> <td>" . $row["status"] .
"</td> <td>" . $row["dueDate"] .
"</td></tr>";
}
} else {
}
?>
</tbody>
-
<script>
$(document).ready(function() {
$("#example1").DataTable({
"paging": false,
"ordering": true,
"info": false,
"language": {
"emptyTable": "No Data"
}
})
});</script>
什么是'method'属性'table'标签里面做什么?!? – arkascha
如果你想显示数据只使用数据表,那么你会错误..你只需要在html/php文件中添加
回答
<table>
中删除method = "post"
标签。<tbody>
标签存在于<table>
里面。删除一个。</td>
在尚未打开时关闭。<tr>
已开业。更新代码:
[注意:The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
来源
2016-08-02 09:49:21
+10以纠正所有可能的问题并特别注意 –
那是因为你错过了
tr
,而是你在回声回声</td>
这里来源
2016-08-02 09:40:15 jonju
相关问题