Server Side Processing - adding php functions & formatting data

Server Side Processing - adding php functions & formatting data

Jam0rJam0r Posts: 1Questions: 1Answers: 0

I'm trying to get loads of data (which will increase) and so i'm wanting to use server side processing.

Using the ssp.class.php i've managed to populate a table with the raw json mysql table data fairly easily however I want to 'format' some of the row's results.

For example, before using datatables I used to get the results with php and pdo and when printing them to the screen, run them through some functions before hand in order to replace ID numbers with names, etc

I can't for the life of me figure out how to do this with SSP?

Answers

  • allanallan Posts: 63,771Questions: 1Answers: 10,510 Site admin

    Three options:

    1. If you can do the transform on the client-side, use columns.render
    2. If you want to do it on the server-side use the formatter option of the columns structure, which you can see used in this example.
    3. If you have a joined table, then you will need to either update the SSP demo class to allow for joins, or write your own server-side processing script. Alternatively, if you use Editor, it has Join support built into its server-side processing handling.

    Allan

This discussion has been closed.