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
相關問題