How to add additional column if fetching data from database via side processing
How to add additional column if fetching data from database via side processing
I am using server side processing for fetching data from database but i want to add check box and put the checkbox value = database one field value.
How can i do this.
Please help us.
In last parmater i want checkbox and have value in it=its respective id value from database
this is my ajax code snippet for fetching value from database.
// parameter names
$columns = array(
array( 'db' => 'internal_id', 'dt' => 'internal_id' ),
array( 'db' => 'cb_id', 'dt' => 'cb_id' ),
array( 'db' => 'assigned_agent', 'dt' => 'assigned_agent' ),
array( 'db' => 'qc_grade', 'dt' => 'qc_grade' ),
array( 'db' => 'platform', 'dt' => 'platform' ),
array( 'db' => 'id', 'dt' => 'id' )
);
this is my javascript code snippet.
$(document).ready(function() { $('#dataTables-example').dataTable( { "oLanguage": { "sInfoEmpty": "No data available" }, "processing": true, "serverSide": true, "ajax": "ajax.php", "columns": [ { "data": "internal_id" }, { "data": "cb_id" }, { "data": "assigned_agent" }, { "data": "qc_grade" }, { "data": "platform" }, { "data": "id" } ] } ); } );