vlibTemplate

vLib Logo

6.9. setDbLoop()

Function Description
 setDbLoop(string loopname, resource db_result [, db_type])

setDbLoop() builds an array for using with <TMPL_LOOP> from a Database result resource or a statement for those databases where it applies (see below).
db_type is the name of the database that the result resource is associated to, if it's not specified then MYSQL is the default.
Below is a list of databases currently supported and information about the db_result needed to be passed:

MYSQL - a normal result resource
POSTGRESQL - a normal result resource
INFORMIX - resultid returned by ifx_query() or ifx_prepare()
INTERBASE - result identifier
INGRES - result identifier
MSSQL - result resource
MSQL - result resource
OCI8 - statement handle
ORACLE - cursor handle
OVRIMOS - resultid
SYBASE - result resource



Warning
This function is curently experimental, so as much testing as possible needs to be carried out. If you use any of these databases either succesfully or unsuccefully, please provide feedback to help us improve the function. Only MYSQL and INFORMIX have been tested.

Please see the <TMPL_LOOP> section for information on how to build a loop.