Custom search in ajax data
iprastha opened this issue · 2 comments
iprastha commented
Hi, first of all a great and very useful library!
I have a custom search in my datatable using the ajax.data implementation, something like this:
$('#mytable').dataTable( {
processing: true,
serverSide: true,
ajax: {
"url" : "myajaxurl.php",
"type" : "POST",
"data" : function (d){
d.my_custom_filter = $('#my_custom_filter').val();
}
}, ...
How do I pass the "my_custom_filter" value into the database query as an additional where statement ?
Thank You
zepernick commented
@iprastha you can accomplish this in the whereClauseArray method.. Here is another issue that has an example of how to do it
iprastha commented
Thanks! Got it to work now using the example given in that post.