Excluding rows from a matching search filter query (i.e. with search string "football -american"
Excluding rows from a matching search filter query (i.e. with search string "football -american"
Hi there, I can't find the documentation to do this, so apologies if It's an obvious question.
I'm applying a search filter to a dataTable on initialisation via oSearch. This is populated from a url query parameter.
i.e. datatable.php?filter=stars
This works fine as it only returns rows matching the search parameter.
The problem is this parameter still returns too many rows - I need to to exclude some rows from the results.
However I don't have an exact second string to match against, so what I really need to do is exclude the rows I don't want.
i.e. a search string along the lines of "stars -celebrity"
I've tried using the bRegex flag, but I can't seem to get that to work.
Any tips / advice, greatly appreciated!
I'm applying a search filter to a dataTable on initialisation via oSearch. This is populated from a url query parameter.
i.e. datatable.php?filter=stars
This works fine as it only returns rows matching the search parameter.
The problem is this parameter still returns too many rows - I need to to exclude some rows from the results.
However I don't have an exact second string to match against, so what I really need to do is exclude the rows I don't want.
i.e. a search string along the lines of "stars -celebrity"
I've tried using the bRegex flag, but I can't seem to get that to work.
Any tips / advice, greatly appreciated!
This discussion has been closed.
Replies
Allan