जब मैं मेज पर मेरी डेटाबेस से डेटा प्राप्त करने का प्रयास है, मैं इस त्रुटि मिलती है:DataTables में पंक्ति 0 के लिए डेटा स्रोत से अनुरोध किया गया अज्ञात पैरामीटर '1'
DataTables warning (table id = 'student_table'): Requested unknown
parameter '1' from the data source for row 0
नीचे जावास्क्रिप्ट कि मैं प्रयोग किया जाता है
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#student_table').dataTable({
"bProcessing": true,
"bServerSide": true,
"sServerMethod": "POST",
"sAjaxSource": "<?php echo base_url()?>index.php/data/all"
});
});
</script>
JSON डेटा पुनः प्राप्त:
{"sEcho":0,"iTotalRecords":3,
"iTotalDisplayRecords":3,
"aaData":[["85","t1","1D"],["74","test475","4A"],
["777","maiz","5"]],"sColumns":"id,name,class"}
नीचे मेरी मेज है:
<table class="datatable tables" id="student_table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Class</th>
</tr>
</thead>
<tbody>
<tr>
<td class="dataTables_empty">Loading data from server</td>
</tr>
</tbody>
</table>
PHP कोड (प्रज्वलित datatables)
$this->load->library('datatables');
$this->datatables->select('admission,name,class');
$this->datatables->from('students');
echo $this->datatables->generate();
मैं CodeIgniter और DataTables उपयोग कर रहा हूँ।
मुझे यह त्रुटि क्यों मिल रही है और तालिका में डेटा कैसे पुनर्प्राप्त करें?
मैंने दोनों जीईटी और पोस्ट की कोशिश की लेकिन मुझे एक ही त्रुटि मिल गई। – LiveEn
त्रुटि php भाग में होनी चाहिए, क्या आप इसे दिखा सकते हैं? – JvdBerg
मैंने मुख्य पोस्ट में php code (ignated datatables) जोड़ा है। – LiveEn