In the DBQuery and DBSimpleQuery there are 2 properties to set the SQL. The first one is SQL and you can assign plain sql to it. The other one is QUERY and you open up a Query Designer. The Designer is also used in setting filters, so it is used in the DBTable as well, but only for the where part.

The query designer is able to create complex queries including inner/outer joins, functions, grouping etc.

Remark: Sometimes when you open up the designer, no tables are shown, or the  schema is not shown. That is caused by the fact that sometimes the connection to the database gets lost. That can happen if you haven’t accessed the database for a while, sometimes there are other technical reasons beyond the PHsPeed environment. If that happens, then close the designer and open the database viewer then opens when you click on the vertical ‘database’ tab. Clicking on the small refresh button restores the database connection and then you can re-open the Query designer. 


To start the query designer, press the … button in the property editor. The content name will be generated automatically (this is a reference to the container where the configuration is stored). 





(btw, it is not mandatory to use the query, you can use sql. However, make a choice as you cannot use both at the same time.

The Query designer will be opened, however initially with a clean design area and a list of available tables in the left column.