... |
... |
@@ -52,7
+52,7 @@ |
52 |
52 |
{{/info}} |
53 |
53 |
|
54 |
54 |
Database queries can be tested directly from the configuration UI. For this purpose a test console is provided below the SQL editor (see [[figure>>||anchor="fig_data_db_query"]]). |
55 |
|
-In the header of the console there is a row of buttons for controling the query: |
|
55 |
+In the header of the console ther is a row of buttons for controling the query: |
56 |
56 |
|
57 |
57 |
* {{ficon name="database-search"/}}**Perform query** |
58 |
58 |
Runs the database query. If //query parameters// ({{code}}?{{/code}}) are provided the user will be prompted to input values vor those parameters. Otherwise the result of the query will be displayed directly in the //table view//. |
... |
... |
@@ -123,21
+123,3 @@ |
123 |
123 |
Retrieves the names of all persons that live in certain city. The city and the ZIP code are given as URL parameters. |
124 |
124 |
|
125 |
125 |
URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&sqlParameter=Paris,75001{{/code}} |
126 |
|
- |
127 |
|
- |
128 |
|
-{{code language="sql"}} |
129 |
|
-select name, vorname from tabelle where ort like concat(?, '%') |
130 |
|
-{{/code}} |
131 |
|
- |
132 |
|
-This SQL statement returns the names of all persons who live in a place that **starts **with the given characters. The '%' character serves as a wildcard for any number of characters. Depending on the DBMS used, the syntax may differ slightly (here: MySQL). The requested value is passed via URL parameters. |
133 |
|
- |
134 |
|
-URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&sqlParameter=Par{{/code}} |
135 |
|
- |
136 |
|
- |
137 |
|
-{{code language="sql"}} |
138 |
|
-select name, vorname from tabelle where lower(ort) like concat('%', lower(?), '%') |
139 |
|
-{{/code}} |
140 |
|
- |
141 |
|
-This SQL statement returns the names of all persons who live in a place that **contains **the given characters. Upper/lower case spelling is irrelevant becauce the statement converts both, the value column and the actual filter value to lower case (lower(...)). The requested value is passed via URL parameters. |
142 |
|
- |
143 |
|
-URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&sqlParameter=aRi{{/code}} |