Data Not Updated in Data Editor

Data Not Updated in Data Editor

Muhammad HarisMuhammad Haris Posts: 4Questions: 3Answers: 1
edited December 2016 in Free community support

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

  • Muhammad HarisMuhammad Haris Posts: 4Questions: 3Answers: 1
    edited December 2016 Answer ✓

    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.

  • allanallan Posts: 63,834Questions: 1Answers: 10,518 Site admin

    Thanks for posting back - good to hear you've got it working.

    Allan

This discussion has been closed.