Generate the javascript configuration and database query, using datatable.js