diff --git a/lib/WebGUI/i18n/English/SQLReport.pm b/lib/WebGUI/i18n/English/SQLReport.pm index 7eb602e4a..13c965ef0 100644 --- a/lib/WebGUI/i18n/English/SQLReport.pm +++ b/lib/WebGUI/i18n/English/SQLReport.pm @@ -9,20 +9,41 @@ our $I18N = { '71' => { message => q|SQL Reports are perhaps the most powerful wobject in the WebGUI arsenal. They allow a user to query data from any database that they have access to. This is great for getting sales figures from your Accounting database or even summarizing all the message boards on your web site.

- - -Preprocess macros on query?
-If you're using WebGUI macros in your query you'll want to check this box. +Nested query support
+The SQL Report wobject supports up to 4 nested queries. Each subsequent query is executed for each row in the previous query results. For example, if you have two queries: query1 and query2, then query2 will be executed once for each row returned in query1. You can use placeholder parameters to compose subqueries with data from prior queries.

- Debug?
If you want to display debugging and error messages on the page, check this box.

+Preprocess macros on query?
+If you're using WebGUI macros in your query you'll want to check this box. +

+ +Placeholder Parameters
+Placeholders, also called parameter markers, are used to indicate values in a SQL query that will be supplied later, before the statement is executed.
+Placeholder Parameters are delimited by commas.
+There are four input types: +

+ + + + +

Example: +

+Query: select * from some_table where some_field = ? and some_other_field < ?
+Placeholder Parameters: query1:pageId,form:field1 +
+ +In this example the first question mark will contain the field value of pageId in query1, +while the second question mark will contain the form variable "field1". +

Query
-This is a standard SQL query. If you are unfamiliar with SQL then you'll likely not want to use this wobject. You can make your queries more dynamic by using the ^FormParam(); macro. +This is a standard SQL query. If you are unfamiliar with SQL then you'll likely not want to use this wobject.
+A question mark ? in the query represents a placeholder. Note that the ? is not enclosed in quotation marks, even when the placeholder represents a string. +

Database Link
@@ -35,7 +56,7 @@ How many rows should be displayed before splitting the results into separate pag |, - lastUpdated => 1082365503 + lastUpdated => 1082365505 }, '61' => { @@ -47,7 +68,10 @@ How many rows should be displayed before splitting the results into separate pag message => q|Debug: Query:|, lastUpdated => 1031514049 }, - + 'debug placeholder parameters' => { + message => q|Debug: Processed Placeholder parameters:|, + lastUpdated => 1031514049 + }, '12' => { message => q|Debug: Error: Could not connect to the database.|, lastUpdated => 1031514049 @@ -139,6 +163,80 @@ The data in this field. +hasNest
+A boolean indicating whether query2 has returned any results. +

+ +query2.columns_loop
+A loop containing information about each column for query2. +

+

+ +column.number
+An integer starting with 1 and counting through the number of columns. +

+ +column.name
+The name of this column as returned by the query. +

+
+ +query2.rows_loop
+A loop containing the data returned from query2. +

+
+ +query2.row.number
+An integer starting with 1 and counting through the total list of rows. +

+ +query2.row.field.NAME.value
+The data for a given field in this row where NAME is the name of the field as it is returned by the query. +

+ +query2.row.field_loop
+A loop containing all of the fields for this row. +

+
+ +field.number
+An integer starting with 1 and counting through the number of fields in this row. This is the same as column.number in the column_loop. +

+ +field.name
+The name of the field as it is returned by the query. +

+ +field.value
+The data in this field. +

+ +
+ +query2.hasNest
+A boolean indicating whether the query3 has returned any results. +

+ +query3.columns_loop
+A loop containing information about each column for query3. +

+ +query3.rows_loop
+A loop containing the data returned from query3. +

+ +query2.rows.count
+The total number of rows returned by query2. +

+ +query2.count.isZero
+A boolean indicating that query2 returned zero rows. +

+ +
+ +
+
rows.count
@@ -154,7 +252,7 @@ The default label for rows.count.isZero.

|, - lastUpdated => 1082365471 + lastUpdated => 1082365473 }, '16' => { @@ -166,6 +264,14 @@ The default label for rows.count.isZero. message => q|Debug: Error: The SQL specified is of an improper format.|, lastUpdated => 1031514049 }, + 'Placeholder Parameters' => { + message => q|Placeholder Parameters|, + lastUpdated => 1031514049 + }, + 'Add another query' => { + message => q|Add another query|, + lastUpdated => 1031514049 + }, };