TT Web Site Manager The SQL prompt
The SQL prompt

The SQL prompt is a script which takes any SQL code from a form and tries to run it. For this reason it is a very powerful script so it must be used carefully. You must only give access to it with the user management script to people you Really trust, and you must consider whether you want your MySQL database login to have CREATE, DROP and ALTER rights.

That aside, the SQL prompt is a very useful script. If the SQL query returns a record set it displays the record set as a table, as shown below.

SQL prompt
Enter SQL code here

Warning! This script will try to run any SQL you give it so be careful!
ref name site type ContentType counter
1 news.html 1 0 text/html 37
2 editnews.html 1 1 text/html 37
3 ttwm_logo.xbmp 1 0 image/x-xbitmap 74
Site management - Refresh this page

If no record set is returned the script returns the message generated by the database server, as with this SQL syntax error where I haven't escaped the apostrophe in "O'Connor".

SQL prompt
Enter SQL code here

Warning! This script will try to run any SQL you give it so be careful!
No record set was returned. Here is the message returned by the SQL server.

1064: You have an error in your SQL syntax near 'Connor'' at line 1

Site management - Refresh this page

Item management: Conditional items Contents Security issues