I am trying to find a way to use filter of datatable server side processing joined tables but not working well. If you have good experience of its, Please help me.
This is column structure.
$columns = array(
array('db' => 'date', 'dt' => 'td_date'),
array(
'db' => 'user_id', 'dt' => 'td_username',
'formatter' => function ($d, $row) {
$p_general = new General();
$userInfo = $p_general->getValueOfAnyTable('users', 'id', '=', $d);
$userInfo = $userInfo->results();
return $userInfo[0]->name;
}
),
array('db' => 'event', 'dt' => 'td_event',),
array('db' => 'plant_UID', 'dt' => 'td_UID_text',),
array(
'db' => 'note', 'dt' => 'td_note',
),
);
This(below) is working about another fields but not working about "username".
$("#col1_filter").keyup(function() {
var value = $("col1_filter").val();
if (table.columns(3).search() !== value) {
table.columns(0).search(value).draw();
}
});