Open walliby opened 11 years ago
Try asking the datatables forum: https://datatables.net/forums/
Following up on the individual column filtering, I had to add any $_GET['sSearch_colnum'] to my paginate conditions. Any thoughts on adding support for individual column filtering in the component? Below is how datatables implemented it in straight PHP...
/* Individual column filtering */
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" && $_GET['sSearch_'.$i] != '' )
{
if ( $sWhere == "" )
{
$sWhere = "WHERE ";
}
else
{
$sWhere .= " AND ";
}
$sWhere .= "`".$aColumns[$i]."` LIKE '%".mysql_real_escape_string($_GET['sSearch_'.$i])."%' ";
}
}
Will do at some point. Feel free to add it yourself and if it works I can add it into the code.
This may be more of a general datatables question but I am not finding any resolution in the datatables docs. I am not having any luck getting individual column filtering to work.
This works to filter the whole table... $('select#association').change( function() { oTable.fnFilter( $(this).val()); } );
But this does not work to filter only my 2nd column... $('select#association').change( function() { oTable.fnFilter( $(this).val(), 1); } );