[Impressum/Imprint] [Kontakt/Contact Me]
Home Working with TNG's SQL-based Reports (A Guide to my Report Library) Understanding SQL Select Statements Creating 'Static' Output Files from SQL Statements
 TNG - Tips & Tricks
 Working with TNG's SQL-based Reports (A Guide to my Report Library)

VIEW-based TNG reports

Some of my TNG reports are based on MySQL VIEWs. Defining those reports is a two-step process:


First, you have to define a database VIEW. (Views are available since MySQL 5.0)

Example: CREATE VIEW v_test AS SELECT CONCAT("This site works with MySQL ", VERSION()) AS Info;


Then you can use this view like a table within a TNG report.

Example: SELECT Info FROM v_test;


View-based TNG reports are useful for complex SQL statements which TNG's showreport.php can't handle.


Copyright © http://www.ahnendaten.de/tng/
Letzte Aktualisierung am 11. Juni 2017

Home Working with TNG's SQL-based Reports (A Guide to my Report Library) Understanding SQL Select Statements Creating 'Static' Output Files from SQL Statements