Good morning. In a generic search, on the server, the search string is in $_POST['search']['value'];
Good morning. In a generic search, on the server, the search string is in $_POST['search']['value'];
ANGELDS
Posts: 5Questions: 1Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
This question has an accepted answers - jump to answer
Answers
Sorry, I put the text in the title. If an administrator can delete it, I appreciate it...
My question is the equivalent of sSearch_0 of DataTables 1.9 in DataTables 1.10....For example, the one of sSearch is search ( $_POST['search']['value'] ), but to search in the first column I tried with $_POST['search_0']['value'] and it does not work for me ...
Sounds like you are asking about the parameters sent when using server side processing with Datatables 1.10. See the Server Side Processing docs for the parameters.
If this doesn't help then please provide more details about your questions.
Kevin
Thank you very much, Kthorngren. Yes, it is because of the parameters sent to the server...
Read value
$draw = $_POST['draw'];
$row = $_POST['start'];
$rowperpage = $_POST['length']; // Rows display per page
$columnIndex = $_POST['order'][0]['column']; // Column index
$columnName = $_POST['columns'][$columnIndex]['data']; // Column name
$columnSortOrder = $_POST['order'][0]['dir']; // asc or desc
$searchValue = $_POST['search']['value']; // Search value
These work well for me, but with
$campo_Gender = $_POST['colums'][2]['search']['value']; // tfoot
does not filter in the column. However, if I directly assign the value
$campo_Gender= "COUI";
$searchQuery .= " and location like '%".$campo_Gender." %'";
if it works...
If you post a link to a test case showing the issue, I'd be happy to take a look.
I'd also note that:
has a typo.
colums
should becolumns
. That alone might be the issue.Allan
Yes!!! It was that. Thanks a lot!!!