Index: openacs.org-dev/packages/acs-core-docs/www/xml/kernel/db-api.xml =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/acs-core-docs/www/xml/kernel/db-api.xml,v diff -u -r1.1.1.2 -r1.1.1.3 --- openacs.org-dev/packages/acs-core-docs/www/xml/kernel/db-api.xml 31 Jul 2002 16:30:50 -0000 1.1.1.2 +++ openacs.org-dev/packages/acs-core-docs/www/xml/kernel/db-api.xml 11 Aug 2002 00:42:49 -0000 1.1.1.3 @@ -1,10 +1,10 @@ Database Access API - + by Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002. - + Tcl procedures: /packages/acs-kernel/10-database-procs.tcl @@ -750,8 +750,7 @@ Returns the next value for the sequence sequence-name (using a SQL statement like SELECT sequence-name.nextval FROM DUAL). If sequence pooling is enabled for the sequence, transparently -uses a value from the pool if available to save a round-trip to the database -(see ). +uses a value from the pool if available to save a round-trip to the database. @@ -973,13 +972,23 @@ var_name:1, var_name:2, etc, setting var_name:rowcount to the total number of rows, and setting var_name:columns to a - list of column names. Each row also has a column, rownum, automatically + list of column names. + + + + Each row also has a column, rownum, automatically added and set to the row number, starting with 1. Note that this will override any column in the SQL statement named 'rownum', also if you're using the Oracle rownum pseudo-column. - + + If the -local is passed, the variables defined + by db_multirow will be set locally (useful if you're compiling dynamic templates + in a function or similar situations). + + + You may supply a code block, which will be executed for each row in the loop. This is very useful if you need to make computations that are better done in Tcl than in SQL, for example using ns_urlencode @@ -1256,3 +1265,8 @@ +