Data Not Updated in Data Editor
Data Not Updated in Data Editor
Hi, Since i using data editor it add the data and delete data perfectly but i am not able to update the data when i enter the data into the fields they does not change, so what should i do?
Only problem is occurred in updating the records only.
Script that i am using is as follow:
var editor;
$(document).ready(function(){
editor = new $.fn.dataTable.Editor( {
ajax: 'editor_student.php',
table: '#example',
fields: [
{ label: 'School name', name: 'school_name' },
{ label: 'School Contact name', name: 'contact' },
{ label: 'School Email', name: 'email' }
]
});
$('#example').DataTable( {
ajax: 'editor_student.php',
dom: 'Bfrtip',
columns: [
{ data: 'school_name' },
{ data: 'contact' },
{ data: 'email' },
],
select: true,
buttons: [
{ extend: 'create', editor: editor },
{ extend: 'edit', editor: editor },
{ extend: 'remove', editor: editor }
]
} );
});
This question has an accepted answers - jump to answer
Answers
Guys this problem has been solved by changing the datatype of contact column in database table to bigint because int was not compatible with the data and data table return same value repeatedly.
Thanks for posting back - good to hear you've got it working.
Allan