... |
... |
@@ -21,6
+21,8 @@ |
21 |
21 |
|
22 |
22 |
The entered SQL statement is executed as a prepared statement, which prevents SQL injection attacks. You should not and need not use inverted commas (` or '). Also, you can use question marks ( ? ) as placeholders to build queries dynamically. |
23 |
23 |
|
|
24 |
+{{version major="6" minor="4" patch="0"/}} [[Variables>>doc:Formcycle.UserInterface.Variables.WebHome]] can be used in the SQL statements. |
|
25 |
+ |
24 |
24 |
== Using the database query == |
25 |
25 |
|
26 |
26 |
You can access the database query by making a HTTP request to the corresponding database servlet and providing the required parameters as GET parameters. The URL to the database query servlet is as follows. |
... |
... |
@@ -104,7
+104,7 @@ |
104 |
104 |
|
105 |
105 |
This SQL statement returns the names of all persons with a certain first name. The first name to search for is specified via an URL parameter. |
106 |
106 |
|
107 |
|
-URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&sqlParameter=Robinson{{/code}} |
|
109 |
+URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&queryParameter=Robinson{{/code}} |
108 |
108 |
|
109 |
109 |
|
110 |
110 |
{{code language="sql"}} |
... |
... |
@@ -113,7
+113,7 @@ |
113 |
113 |
|
114 |
114 |
Retrieves the name of a person with a certain ID. The ID is given as an URL parameter. |
115 |
115 |
|
116 |
|
-URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&sqlParameter=100{{/code}} |
|
118 |
+URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&queryParameter=100{{/code}} |
117 |
117 |
|
118 |
118 |
|
119 |
119 |
{{code language="sql"}} |
... |
... |
@@ -122,7
+122,7 @@ |
122 |
122 |
|
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 |
|
-URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&sqlParameter=Paris,75001{{/code}} |
|
127 |
+URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&queryParameter=Paris,75001{{/code}} |
126 |
126 |
|
127 |
127 |
|
128 |
128 |
{{code language="sql"}} |
... |
... |
@@ -131,7
+131,7 @@ |
131 |
131 |
|
132 |
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 |
133 |
|
134 |
|
-URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&sqlParameter=Par{{/code}} |
|
136 |
+URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&queryParameter=Par{{/code}} |
135 |
135 |
|
136 |
136 |
|
137 |
137 |
{{code language="sql"}} |
... |
... |
@@ -140,4
+140,4 @@ |
140 |
140 |
|
141 |
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 |
142 |
|
143 |
|
-URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&sqlParameter=aRi{{/code}} |
|
145 |
+URL for running the query: {{code}}http://myserver/formcycle/datenquelledb?mandantName=myself&name=demo&queryParameter=aRi{{/code}} |