... |
... |
@@ -8,12
+8,13 @@ |
8 |
8 |
|
9 |
9 |
== Creating a database query == |
10 |
10 |
|
11 |
|
-{{id name="data_db_query"/}} |
12 |
|
-{{figure image="data_db_query_de.png"}}Creating a database query in {{formcycle case="dat"/}}{{/figure}} |
|
11 |
+{{figure image="001En.png" width="300"}} |
|
12 |
+Creating a database query in {{formcycle/}} |
|
13 |
+{{/figure}} |
13 |
13 |
|
14 |
14 |
* Enter a unique name. |
15 |
15 |
* Select a database connection |
16 |
|
-* Enter the SQL statement to be executed for the query in the editor (see [[figure>>||anchor="data_db_query"]]). |
|
17 |
+* Enter the SQL statement to be executed for the query |
17 |
17 |
|
18 |
18 |
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. |
19 |
19 |
|
... |
... |
@@ -25,8
+25,7 @@ |
25 |
25 |
http://<server>/formcycle/datenabfragedb |
26 |
26 |
{{/code}} |
27 |
27 |
|
28 |
|
-The servlet URL is displayed beneath the settings (see [[figure>>||anchor="data_db_query"]]). |
29 |
|
-The following URL parameters are supported: |
|
29 |
+The following URL parameters are supported. |
30 |
30 |
|
31 |
31 |
|=Name of the paramter|=Description|=Required |
32 |
32 |
|name|Must match the name of the database query.|Yes |
... |
... |
@@ -37,7
+37,7 @@ |
37 |
37 |
|varName|Allows you to change name of the JSON response object. If not given, a plain JSON object with the result data is returned.|No |
38 |
38 |
|delimiter|The delimiter for the placeholder values, see //queryParameter//. Defaults to a comma {{code}},{{/code}}|No |
39 |
39 |
|
40 |
|
-When accessing a database servlet from a form, always use the database URL contained in the global object //XFC_METADATA//, see also the [[metadata>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.FormMetadata]]. For example: {{code language="javascript"}}XFC_METADATA.urls.datasource_db{{/code}}. |
|
40 |
+When accessing a database servlet from a form, always use the database URL contained in the global object //XFC_METADATA//, see also the [[form-specific JavaScript objects>>doc:Formcycle.FormDesigner.ScriptMetaAndCssTabs.ScriptTab.FormSpecificJavaScriptObjects]]. For example: {{code language="javascript"}}XFC_METADATA.urls.datasource_db{{/code}}. |
41 |
41 |
|
42 |
42 |
Further we recommend you use the script function [[getDataQuery>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.AdditionalScriptFunctions.GetDataQuery]], so you do not have to setup the servlet request manually. The result of the database query is returned as //JSON//. |
43 |
43 |
|