Grid from database table
Generates grouped grid from plain table by dynamic layout script
Do not run this file locally!
Run it from your local or remote web http server where is installed PHP.
Generates treetable from standard database table. Also flips the table and shows data in changed layout. For every action there is used another support code (Layout, Data, Upload). The layout is also generated.
Rows are identified by one unique editable column, with using full ids (including parents ids). For demonstration it shows id column, to see what ids are generated by TreeGrid.
Source files:

Grid.html

(this html page),

GridLayout.php

(server script generates XML layout),

GridData.php

(server script generates XML data),

GridUpload.php

(server script saves XML changes),

../Database/TableData.txt

(source SQL database table),

../Framework/IncDbTxt.php

(included script for SQL TXT database)

The PHP CGI or 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 Basic.php