search filter with percentage symbol

search filter with percentage symbol

probinprobin Posts: 1Questions: 1Answers: 0

I am not a geek,
I use mysql simple database with one tabe
and /! DataTables 1.10.4
and i tested with
/
jQuery JavaScript Library v3.3.1
or
/*! jQuery v1.11.1

I have the same issue

I don't understand why i can't write da ba to search in column 1 = dany marcus + column 2 = backer
I can only search on one column by ny or ny%ma

My searching is only possible on one column.... and i need to add % beetwen string

Thanks for your help

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,931Questions: 26Answers: 5,067
    Answer ✓

    By default Datatables search uses and not or for searching between the columns. You can customize the search by creating a search function as shown in this example:
    https://datatables.net/examples/api/regex.html

    You would change the search mode to regex and use the regex or operator of |. To see how it works check the Treat as regex and uncheck the Use smart search options for the Global Search input. Then in the Global Search type air and you will see one response with the name Airi Satou. Follow that with |lon resulting in air|lon in the Global Search. In addition to Airi you will see all of the rows that have London.

    Kevin

This discussion has been closed.