Description
This is a class written in PHP designed to handle the server-side processing of DataTables jQuery plugin. It takes the parameters passed by the DataTables plugin, like the columns names and number of results per page, and build the queries to database automatically.
Usage
HTML:
Javascript:
$("#results").dataTable({ bServerSide: true, sAjaxSource: "?action=getTableData", aoColumns: [ { "sName": "title" }, { "sName": "date" } ]});
MySQL:
CREATE TABLE `Records` ( `title` VARCHAR(100) NOT NULL, `date` DATETIME NOT NULL)
To call