We help IT Professionals succeed at work.

Jquery datatable, php, Sqlite

SiemensSEN asked
  I would like to use the jquery database (http://datatables.net/). However, my tables are  huge so, I will have to use the server side processing option.

I found this script on the website http://datatables.net/release-datatables/examples/server_side/server_side.html but is written for MYSQL.

The script uses some function that are not available in SQLite (SQL_CALC_FOUND_ROWS ,SELECT FOUND_ROWS())

How can I convert this script to use SQLITE.
Watch Question

you can remove the SQL_CALC_FOUND_ROWS from the query and things should be fine

       * SQL queries
       * Get data to display
      $sQuery = "
            SELECT `".str_replace(" , ", " ", implode("`, `", $aColumns))."`
            FROM   $sTable

And for SELECT FOUND_ROWS(), Just run a simple count query

/* Data set length after filtering */
      $sQuery = " SELECT count(*)  FROM   $sTable      ";