DataTables警告:从'0'行的数据源请求未知参数'2'

时间:2016-05-07 12:45:04

标签: jquery datatables

嗨,任何人都可以帮助我,我正在使用数据表进行pagintion,我正在寻找警告: DataTables警告:从'0'行的数据源请求未知参数'0'

这是我的代码:

<?php 

include "admin/config.php";

$table="t_bad_order_report";
$select=$cfg->select("$table ORDER BY orderid DESC","");


?>

<html>
<head>
    <title></title>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="assets/css/bootstrap/bootstrap.css" /> 


  <link rel="stylesheet" href="assets/css/plugins/datatables/jquery.dataTables.css" />


    <!-- Data Table -->
    <!-- JQuery v1.9.1 -->
    <script src="assets/js/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>

    <!-- Bootstrap -->
    <script src="assets/js/bootstrap/bootstrap.min.js"></script>
    <script src="assets/js/plugins/datatables/jquery.dataTables.js"></script>
    <script src="assets/js/plugins/datatables/DT_bootstrap.js"></script>
    <script src="assets/js/plugins/datatables/jquery.dataTables-conf.js"></script>


        <link rel="stylesheet" href="assets/css/plugins/datatables/jquery.dataTables.css" />



</head>
<body>
    <div class="container-fluid">

          </div>
           <div class="col-sm-10" id="loginas" style="background-color:white"; class="table-responsive">
             <h1>Welcome Admin</h1>


            </div>
              <div class="col-sm-10" id="badorder" style="background-color:white;" class="table-responsive">



                        <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="basic-datatable">
                            <thead>
                                <tr>
                                    <th></th>
                                    <th>Name</th>


                                </tr>
                            </thead>
                            <tbody>
                        <?php 
                                        $count=0;
                                            while($row=mysql_fetch_array($select)){ ?>
                                        <tr>
                                              <td><?php echo $row['store']; ?> </td>




                                        </tr>
                                    <?php } ?>
                            </tbody>
                        </table>

                    </div>

提前致谢

1 个答案:

答案 0 :(得分:0)

thtd的数量不匹配。 试试这样:

<tr>
    <td></td>
    <td><?php echo $row['store']; ?> </td>
 </tr>