I keep on receiving this error alert = "DataTables warning (table id = 'msnc_table'): Requested unknown parameter '1' from the data source for row 0"
Here's a snippet of my code:
HTML:
<table id="msnc_table" class="dataTable">
<thead>
<tr>
<th>Doc#</th>
<th>Date</th>
<th>Code</th>
<th>Customer Name</th>
<th>S/m</th>
<th>Gross</th>
<th>Disc</th>
<th>Net</th>
<th>S.Disct</th>
<th>Invc</th>
</tr>
</thead>
<tbody>
<tr>
<td class="dataTables_empty">Loading data from server</td>
</tr>
</tbody>
</table>
JS
var msnc_table = $('#msnc_table').dataTable({
"bProcessing": true,
"bServerSide": true,
"iDisplayStart": 0,
"iDisplayLength": 11,
"sAjaxSource": base_url+"raw/raw_ajax/get_mnsc",
"bRetrieve": true
});
PHP function
function get_mnsc()
{
echo '{"sEcho":"2","iTotalRecords":20,"iTotalDisplayRecords":20,"aaData": [["232412","12\/8\/2012","DSDA2312","Alfonso supermarket","213","231213","21312","2313","2313","2312432\r\n"],["232412","12\/8\/2012","ADS332","MCL Store","213","231213","21312","2313","2313","2312432\r\n"]]}'
}