How to get started?

How to get started?

medicnickmedicnick Posts: 1Questions: 0Answers: 0
edited February 2012 in DataTables 1.9
There is a lot of great documentation except for one critical area that I've been unable to find. I would like to query, display, and perform DataTables functions on data that resides in a (MySQL) database.

The DataTables documentation seems to only start at the point in which you have already queried and displayed the data in a table. Is there a good link with the required setup to either use PDO/mysqli or jQuery directly or via php scripting to/for/through DataTables?

I do have a function json script in PHP that was written for use with Flexigrid but it is an associated array with specific json return for Flexigrid. I was hoping to switch over entirely to DataTables.

Many thanks in advance!

Replies

  • allanallan Posts: 63,493Questions: 1Answers: 10,470 Site admin
    > it is an associated array with specific json return for Flexigrid

    What does that JSON structure look like? DataTables can accept almost any JSON structure with the mDataProp option: http://datatables.net/blog/Extended_data_source_options_with_DataTables , so you might not need to change your backend at all.

    Have said that, it should be the same as doing a SELECT and then output either as an array of arrays or arrays of objects in JSON, or creating an HTML table. DataTables doesn't have any hard and fast requirements for the JSON format if you are taking that approach.

    Allan
This discussion has been closed.