Datatables 如何消除数据表警告未知参数';0';对于第0行
嗨,我正在为一个项目使用datatable。检索的记录显示正确。但每次页面加载时,都会显示以下警告弹出框“DataTables警告:table id=new_Reference_table-请求的第0行未知参数“0”。有关此错误的详细信息,请参阅”,底部的记录计数显示的条目多于显示的条目,即如果显示3条记录,则显示4条条目中的1到4条。有人能帮忙吗Datatables 如何消除数据表警告未知参数';0';对于第0行,datatables,Datatables,嗨,我正在为一个项目使用datatable。检索的记录显示正确。但每次页面加载时,都会显示以下警告弹出框“DataTables警告:table id=new_Reference_table-请求的第0行未知参数“0”。有关此错误的详细信息,请参阅”,底部的记录计数显示的条目多于显示的条目,即如果显示3条记录,则显示4条条目中的1到4条。有人能帮忙吗 <div id="menu1" class="tab-pane fade in active"> <table id="new_t
<div id="menu1" class="tab-pane fade in active">
<table id="new_table" class="table table-striped"> <!-- bootstrap table class and striped table class-->
<thead>
<tr> <!-- bootstrap table header class-->
<th> Request ID</th>
<th>Request Date</th> <!-- table headers or column names under which the record values will be displayed-->
<th>C_ID</th>
<th>W_ID</th>
<th>Status</th>
</thead>
<tbody>
<?php /* Php While statement which loops and gets the values of all the records*/
while( $row1 = sqlsrv_fetch_array( $stmt1, SQLSRV_FETCH_ASSOC) )
{
echo "<tr>";
echo "<td>".$row1['Req_ID']."</td>";
$string1=$row1["Req_Date"]->format('Y-m-d');
echo "<td>".$string1."</td>";
echo "<td>".$row1['C_ID']."</td>";
echo "<td>".$row1['WID']."</td>";
echo "<td>".$row1['Status']."</td>";
echo "</tr>";
}
?>
</tr>
</tbody>
</table>
<script>
$(document).ready(function(){
$('#new_table').dataTable();
});
</script>
请求ID
申请日期
C_ID
W_ID
地位
$(文档).ready(函数(){
$(“#新#表”).dataTable();
});
向我们展示您的代码。您有
。
…删除第一个
…这就是您出现错误的原因。@davidkonrad嗨,David谢谢您的回复。我删除了第一个,但仍然没有任何更改。你也应该删除最后一个。…@davidkonrad非常感谢你,大卫!现在警告消失了,它工作得很好。