如何消除数据表警告未知参数' 0'第0行

时间:2017-05-15 16:34:47

标签: datatables

error image:您好我正在为项目使用数据表。已正确显示已检索的记录。但每次页面加载时,都会显示以下警告弹出框" DataTables警告:table id = new_referral_table - 请求的未知参数' 0' 0对于第0行。有关此错误的详细信息,请参阅http://datatables.net/tn/4"并且底部的记录计数显示的不仅仅是显示的条目,即如果显示3条记录则显示4条记录中的1到4条。有人可以帮忙吗?

<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>

0 个答案:

没有答案