Server side Multiple word search

Server side Multiple word search

akmalkhonakmalkhon Posts: 15Questions: 0Answers: 0
edited January 2010 in Plug-ins
Good day
I am a newbie and I don't know how to use php sql queries.
I have figured out how to fetch data from a server, but i can't make it search multiple words with space.

whenever i search one word it works fine but if I write another word table is empty.
but if i use in a regular table without server side it search for a lot of space separated words. My datatable is very big. So i need a multiple words search for server side.

I have tried
[code]
function fnFilterNormal ()
{
var jqInputs = $('#filter_norm input');
oTable.fnFilter( jqInputs[0].value);
}
$('#filter_norm input').keyup( fnFilterNormal );
[/code]

but it also uses one word search

Could you just give some link or examples to read.
Great thank for your quick replies.

Replies

  • akmalkhonakmalkhon Posts: 15Questions: 0Answers: 0
    Please help me ;)
  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Is this basically the same question in your other thread: http://datatables.net/forums/comments.php?DiscussionID=1199 ? Have a look at the MySQL RexExp documentation ( http://dev.mysql.com/doc/refman/5.1/en/regexp.html ) and possibly the DataTables source code ( _fnFilterComplete ) to see how it handles the search internally. You'll need to build up the search pattern (probably in PHP), then concatenate the searchable columns together and perform the search on the resulting string.

    Allan
This discussion has been closed.