... |
... |
@@ -8,32
+8,16 @@ |
8 |
8 |
|
9 |
9 |
== Creating a database query == |
10 |
10 |
|
11 |
|
- |
12 |
|
- |
13 |
|
-* Für die Datenbank-Abfrage selbst, werden folgende Daten benötigt: |
14 |
|
-** **Name**: Name der Datenbank-Abfrage |
15 |
|
-** **Beschreibung**: Eine optionale Beschreibung der Datenbank-Abfrage |
16 |
|
-** **Verbindung**: Die [[DB-Verbindung>>doc:DBConnections]], die verwendet werden soll |
17 |
|
- |
18 |
|
-* Die eigentliche **SQL-Abfrage** wird im Editor in der Mitte einegeben (siehe [[Abbildung>>||anchor="data_db_query"]]). |
19 |
|
- |
20 |
|
-Das eingegebene Statement wird als //Prepared-Statement// ausgeführt, so dass keine sogenannte //SQL-Injection// moglich ist. Verwenden Sie daher auch keine Hochkommas. Prinzipiell können auch Übergabeparameter verwendet werden. In der Abfrage setzen Sie an die Stelle des Übergabeparameters ein Fragezeichen {{code}}?{{/code}}. |
21 |
|
- |
22 |
|
- |
23 |
|
- |
24 |
|
- |
25 |
25 |
{{id name="data_db_query"/}} |
26 |
|
-{{figure image="data_db_query_de.png"}}Configuration screen for creating a database query in: (1) list of existing DB queries, (2) editor for defining the SQL query, (3) settings of the DB query, (4) mask for testing the DB query.{{/figure}} |
|
12 |
+{{figure image="data_db_query_de.png"}}Configuration screen for creating a database query in: (1) list of existing DB queries, (2) editor for defining the SQL query, (3) settings of the DB query, (4) console for testing the DB query.{{/figure}} |
27 |
27 |
|
28 |
28 |
* Open the module "Database queries" and click "New" {{ficon name="plus-circle-outline"/}} in the header of the list (see [[figure>>||anchor="fig_data_db_query"]]). |
29 |
|
-* Für die Datenbank-Abfrage selbst, werden folgende Daten benötigt: |
30 |
|
-** **Name**: Ein eindeutiger Name der Datenbank-Abfrage |
31 |
|
-** **Beschreibung**: Eine optionale Beschreibung der Datenbank-Abfrage |
32 |
|
-** **Verbindung**: Die [[DB-Verbindung>>doc:DBConnections]], die verwendet werden soll |
|
15 |
+* The following data is needed for a Database query: |
|
16 |
+** **Name**: A unique name for the database query |
|
17 |
+** **Description**: An optional description for the database query |
|
18 |
+** **Connection**: The [[Database connection>>doc:DBConnections]] that should be used |
33 |
33 |
|
34 |
|
-* Enter a unique name. |
35 |
|
-* Select a database connection |
36 |
|
-* Enter the SQL statement to be executed for the query in the editor (see [[figure>>||anchor="data_db_query"]]). |
|
20 |
+* Enter the **SQL statement** to be executed for the query in the editor (see [[figure>>||anchor="data_db_query"]]). |
37 |
37 |
|
38 |
38 |
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. |
39 |
39 |
|