Gantt SQL database tree
Creates Gantt tree data from plain database table by grouping, uses AJAX
Do not run this file locally!
Run it from your local or remote web http server where is installed PHP.
Source files: GanttTreeDB.html
(this html page),
GanttTreeDef.xml
(static XML layout),
GanttTreeDBData.php
(server script generates XML data),
GanttTreeDBUpload.php
(server script saves XML data to database),
../Database/GanttTree.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 GanttTreeDBData.php and GanttTreeDBUpload.php.
This example supports also free adding, moving and deleting tasks in tree levels.
The level names are shown in Levels columns.
The Levels and ID columns are shown just for debugging.
For more Gantt features see Gantt Local examples or Gantt tutorials.
For more ways of database communication see Basic Ajax or Form Submit PHP examples.
IO communication with server and executed SQL commands