Server Side DataTables for Dummies
Server Side DataTables for Dummies
Hello all. As a DataTables novice, I was hoping that I might be able to get some help with the Server-Side aspect of DataTables. I understand it from a high level view, but I've been getting confused once it gets into the implementation of the "ssp.class.php" file and the "SSP::simple()" / "SSP::complex()" type functions.
Does anyone have or know of any sort of Step-by-Step (For Dummies) guide for these features? Something that may show how to do Querying operations like "WHERE" or "JOIN" into a database?
Any information that you can provide would be greatly appreciated.
This question has an accepted answers - jump to answer
Answers
The SSP class doesn't support join operations I'm afraid. There are some modifications of the script which do support it, but to be honest, you might be better served just implementing your own script. its really just three queries (get the result set to display, the number of records with filtering and the number of records without filtering). That way you have complete control over the queries.
The
SSP::complex()
method can be used to perform conditional queries (where
), and its basically a case of passing in the extra information as an array (property for the column name and value for the conditional value), but the SSP script is designed purely to be a demo script, rather than something that will do everything!Allan
Thanks for the advice!