Server Side REGEX search
Server Side REGEX search
This is my columns and I'm trying to use 'search' function to REGEX those values in Status column. It works just fine choosing them and the REGEX actually sorts and filter correctly.
My problem is that when I do unselect all values, I get this message:
Now the REGEX in my AJAX function is like:
api.column(colIdx).search('(^$|' + search_selected_val + ')',true,false).draw();
And my Server Side SSP script processes the REGEX this way:
if($regexp){
$binding = self::bind( $bindings, $str, PDO::PARAM_STR );
$columnSearch[] = "".$column['db']."
REGEXP ".$binding;
} else {
$binding = self::bind( $bindings, '%'.$str.'%', PDO::PARAM_STR );
$columnSearch[] = "".$column['db']."
LIKE ".$binding;
}
Anyone who know where this is wrong?
Answers
This is my whole AJAX script for REGEX:
`$('select', $('.filters th').eq($(api.column(colIdx).header()).index())).off('change').on('change', function (e) {
e.stopPropagation();
This is my filter class in SSP: