About: Server-side processing Pls Help
About: Server-side processing Pls Help
demir
Posts: 4Questions: 1Answers: 0
PHP
public function getDataStokSelect()
{
if ($_REQUEST) {
$requestData= $_REQUEST;
$columns = array(
// datatable column index => database column name
0 =>'a',
1 =>'b',
2=> 'c',
3=> 'd',
4=> 'e',
5=> 'f',
);
$id=$requestData['columns']['id']['data']; // **If i can send it i can not catch it on the server side~~~~**
$where= " `b` LIKE '".$id."%' ";
$json=$this->fastDataTable($requestData,'views_stokTable',$columns,false,false);
echo json_encode($json);
}
}
JS
function createLBTable(dataWay,columns,id="",tableName='data-table') {
table = $('#'+tableName).DataTable({
"processing": true,
"serverSide": true,
"ajax":{
url :base_url+dataWay,
type: "POST" ,
data:{'id':id}, //## I can not send an id here !!!!
error: function(){
$(".data-table-error").html("");
$("#data-table").append('<tbody class="data-table-error"><tr><th colspan="3">No data found in the server</th></tr></tbody>');
$("#data-table_processing").css("display","none");
}
},
"language": turkish,
"columns":columns,
"columnDefs": [
{
"className":'none',
"targets": 0
}]
});
}
Normally I can get this feature on the server side.But I can not catch processing, serverSide when is true. How do I catch the id I send on php. Thank you for your time.
This discussion has been closed.