Index: openacs-4/packages/acs-templating/www/doc/api/database.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/api/database.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/doc/api/database.adp 27 Oct 2014 16:40:18 -0000 1.2 +++ openacs-4/packages/acs-templating/www/doc/api/database.adp 7 Aug 2017 23:48:02 -0000 1.3 @@ -1,17 +1,25 @@ -{/doc/acs-templating {Templating}} {Templating System API: Database Query} +{/doc/acs-templating {ACS Templating}} {Templating System API: Database Query} Templating System API: Database Query - - -

Database Query

Summary

Utilize the results of a database query as a template data -source.

Method

+

Database Query

+ +Templating System : API +Reference +

Summary

+

Utilize the results of a database query as a template data +source.

+

Method

+
 query name structure sql -db dbhandle 
                              -startrow n 
                              -maxrows n
                              -bind (set|list)
                              -eval { code }
-

Perform a query and store the results in a local variable.

Examples

+
+

Perform a query and store the results in a local variable.

+

Examples

+
 set db [ns_db gethandle]
 
 # this will set a scalar named current_time
@@ -38,19 +46,24 @@
 template::query persons nestedlist "
   select state, city, first_name, last_name from users" \
   -db $db -groupby { state city }
-

Note(s)

+

Note(s)

+
templating\@arsdigita.com - +database. The code may refer to the row array to get and +set column values.
  • The bind option is valid only when using +Oracle.
  • + +
    + \ No newline at end of file