Date range filtering on the server side

Date range filtering on the server side

gentunisiagentunisia Posts: 1Questions: 0Answers: 0
edited June 2013 in General
Hello everyone, i'm a newbie to datatables.
I've successfully to make the server-side processing example to work. Now i have a table which has 5 columns
[code]



start date
end date
Ingrédient1
Ingrédient2
Ingrédient3




Loading data from server
Loading data from server
Loading data from server
Loading data from server
Loading data from server




start date
start date
Ingrédient1
Ingrédient2
Ingrédient3



[/code]
And i initialized datatable like this
[code]
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "dbDataTables.php"

} );
} );
[/code]
The filtering and sorting works grate, but now i want to filter the results within a date range
that i enter with a date picker. So i got confused when reading posts like these:
1)http://www.datatables.net/forums/discussion/313/filter-date-range/p1 where @alllan suggest the use of fnFilter
2)http://datatables.net/forums/discussion/3931/server-side-filtering-on-specific-columns-with-input-and-select/p1 where @allan uses the fnServerData to pass variables to the serverside.
So what is the right way? Do i have to change scripts/server_processing.php to add a WHERE clause in the mysql query? if yes How can i pass the date variables to the server_processing script
Thank you for helping
Regards
This discussion has been closed.