Server side paging with DLL on SQL database
Using TreeGrid server library for server side paging upon SQL database
Do not run this file locally!
Run it from your local or remote web http server where is installed PHP.
Source files:

DB.html

(this html page),

DBDef.xml

(static XML layout),

DB.php

(server script generates and processes XML data and generates XLS export; uses the TreeGrid.dll/so),

../Database/TableData.txt

(source SQL database table)

TreeGrid.dll

or

TreeGrid.so

(library located in package root directory /Server/TreeGrid32/ or /Server/TreeGrid64/ depending on server system, used in DB.php),

tmp/

directory can be used for temporary data to free PHP memory.

The PHP CGI/FastCGI or mod_php/ISAPI service program must have write access to all files in folder /Examples/Php/Database

This example uses

PHP Text DB API

, a flat file SQL database. The PHP core files for txt database are located in /php-txt-db-api directory. The database is located in directory /Database where are stored tables as individual txt files.
For database access are used objects Database and Recordset defined in /Framework/IncDbTxt.php file.
You can change database provider to other (

MySql

,

ODBC

,

ADO

,

SQLite

,

SQLite3

) by including other IncDb...php file and changing connection string when creating Database object. See comments in the DB.php file.

To use the TreeGrid server side library you must copy the library TreeGrid.dll or TreeGrid.so file to your PHP extensions directory and add it to extensions in PHP.ini!

This example demonstrates using

TreeGrid server side DLL / SO

library for server side paging, calculations, grouping, sorting, filtering, Excel export and updates.
This example loads all data from database and fills them to TreeGrid DLL and uses it for generating data, pages and export for client. Uploaded changes are sent to both database and TreeGrid DLL to be synchronized.