TT Web Site Manager Item management: SQL query items
Item management: SQL query items

SQL query items contain SQL queries which are executed once as the item is processed by build.php. If the SQL query returns a result set then the first line is returned as an array $tt_sql_data whose indexes are the table column names. PHP variables may be used but they must be enclosed whthin concatenation operators and quote marks as if they were being combined into a single string by some PHP code.

Item name
Container
Type

Enter SQL code here.
PHP variables may be used but they must be enclosed within concatenation operators and quote marks.
E.G. insert into tables(data) values('" . $data . "')
select data from table where ref=" . $data . "
If the SQL query returns a result set then the first line is returned as an array $tt_sql_data whose indexes are the table column names.

SQL

Item management: PHP with SQL wrapper items Contents Item management: Conditional items