I have a situation with datatables using server-side script
Table localidad
localidad origen
localidad destino
In $ joinQuery: (server-side)
..
LEFT JOIN localidad GO ON A.mxv_loc_ori_fk = GO.loc_id
LEFT JOIN localidad GD ON A.mxv_loc_dest_fk = GD.loc_id
..
In $ columns:
array(
array( 'db' => '('GO'.'loc_nombre') as origen', 'dt' => "origen", 'field' => 'origen'),
array( 'db' => '('GD'.'loc_nombre') as destino', 'dt' => 'destino', 'field' => 'destino' )
);
In JS:
"columns": [
{"data":"origen"},
{"data":"destino"}
]
All right up to this point. The columns show the info correctly. The problem is when I try to filter or sort, that's where it does not work.