Jquery dataTable-搜索和条目数不正确

Jquery dataTable-搜索和条目数不正确,jquery,datatable,Jquery,Datatable,我正在使用dataTable显示来自数据库的数据。但是条目数和搜索框工作不正常条目与我拥有的行数不匹配,并且搜索框不工作。有什么问题吗 这是我的桌子 <table class="table table-striped table-bordered table-hover" id="dataTables-gatepass"> <thead> <tr> <th&g

我正在使用
dataTable
显示来自
数据库的数据。但是
条目数
搜索
框工作不正常<代码>条目
与我拥有的
行数
不匹配,并且
搜索
框不工作。有什么问题吗

这是我的桌子

<table class="table table-striped table-bordered table-hover" id="dataTables-gatepass">
            <thead>
                <tr>
                    <th>
                        Consignee
                    </th>

                    <th>
                        Address
                    </th>
                    <th>
                       Broker Name
                    </th>
                    <th>
                       Carrying Aircraft
                    </th>
<th>
                        Registration No.
                    </th>

<th>
                        Date of Arrival 
                    </th>
                    <th>
                        Exportation   
                    </th>
                    <th >
                        PKG
                    </th>
                     <th >
                        Gross Weight
                    </th>
                     <th >
                        AWB/MAWB No.
                    </th>
                     <th >
                        HAWB No.
                    </th>
                     <th >
                        Action
                    </th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($results as $key){?>

                <tr>
                    <td><?php echo $key['consignee'];?></td>
                    <td><?php echo $key['address1'].' '.$key['address2'];?></td>
                    <td><?php echo $key['broker'];?></td>
                    <td><?php echo $key['carrying_aircraft'];?></td>
                    <td><?php echo $key['reg_no'];?></td>
                    <td><?php echo $key['date_arrival'];?></td>
                    <td><?php echo $key['air_exportation'];?></td>
                    <td><?php echo $key['pkg'];?></td>
                    <td><?php echo $key['gross_weight'];?></td>
                    <td><?php echo $key['awb_mawb'];?></td>
                    <td><?php echo $key['hawb'];?></td>
                    <td>

<a  target="_blank" href="<?php echo site_url('gatepass/gatepass_print?id='.$key['gatepass_ID']);?>"><button type="submit" class="btn btn-xs blue tooltips " title="print" data-container="body" data-placement="top" data-html="true"><i class="fa fa-print"></i></button></a>
                    </td>
                    <tbody></tbody>
                </tr>




            <?php } ?>
            </tbody>
        </table>
$('#数据表网关传递')。数据表();
//#myInput是一个元素
$('#myInput')。打开('keyup',函数(){
table.search(this.value).draw();
});

有关更多信息,请使用此链接

您有一套额外的车身tags@Bindrid我错过了,谢谢!
$(document).ready(function(){

$('#dataTables-gatepass').dataTable();

});
$('#dataTables-gatepass').dataTable();



// #myInput is a <input type="text"> element

$('#myInput').on( 'keyup', function () {
    table.search( this.value ).draw();
});