SQLite Version of PHP Processing Code

SQLite Version of PHP Processing Code

cliftonitecliftonite Posts: 8Questions: 0Answers: 0
edited January 2012 in DataTables 1.8
I'm really loving this plugin, and have had a lot of success with it!

I have one issue. I'm trying to do server-side processing, but I need an SQLite version of the code/queries found on this page: [quote]http://datatables.net/release-datatables/examples/data_sources/server_side.html
[/quote]

Also found inside the download package:

[quote]/examples/server_side/scripts/server_processing.php)[/quote]

Has anyone written an SQLite version using PDO (PHP Data Objects) that will replicate the functionality written for MySQL?

Thanks!

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Not as far as I am aware - you would need to make the required modifications to the script. There are a number of server-side processing scripts here: http://datatables.net/development/server-side/ , but nothing that exactly matches your needs. If you do create a script, perhaps you would be willing to contribute it back? :-)

    Allan
  • cliftonitecliftonite Posts: 8Questions: 0Answers: 0
    Thanks, Allan. :)

    Yes, if I manage to get something to work, I'll share it. :)
  • cliftonitecliftonite Posts: 8Questions: 0Answers: 0
    Allan, I'm still banging my head on this. :) I'd like to isolate the server_processing.php file and test it with my SQLite/PDO code until I'm getting the right JSON output. Can you help me know what dummy input parameters I'd need to set in order to simulate this script working with the Datatables JS?

    I can see all these GET query variables, but I have no idea what kind of sample data I should set them to for testing purposes:

    [code]
    $_GET['iDisplayStart']
    $_GET['iDisplayLength']
    $_GET['iSortingCols']
    $_GET['iSortCol_'.$i]
    $_GET['sSortDir_'.$i]
    $gaSql['link']
    $_GET['sEcho']
    [/code]

    Any ideas to help me limp along?

    Thanks!
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    The parameters that are sent to the server are documented here: http://datatables.net/usage/server-side . The exact number will depend on the number of columns that you have (for example bSortable_5 etc).

    Allan
This discussion has been closed.