【发布时间】:2014-07-10 17:47:39
【问题描述】:
我已使用 ignited datable 将其集成到 codeigniter 中,但出现以下错误:DataTables 警告:table id=example2 - Requested unknown parameter '0' for row 0。
$(document).ready(function() {
$('#example2').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sServerMethod": "POST",
"sAjaxSource": "<?php echo base_url()?>auth/datatable"
} );
} );
这是我的html
<table id="example2" class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Class</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
这里是生成的json
{"draw":0,"recordsTotal":2,"recordsFiltered":2,"data":[{"email":"admin@admin.com","first_name":"Admin","last_name":"istrator"},{"email":"subhadeepgayen@gmail.com","first_name":"Subhadeep","last_name":"Gayen"}]}
似乎可以找到任何解决方案:(
【问题讨论】:
标签: codeigniter datatable