SQL Yoga version 1.1.0 build 4 :: Visit website

Printer friendly version

command dbconn_retrieveQueryAsArray

Executes a SQL query against a database connection and returns the results in a numerically indexed array.

command dbconn_retrieveQueryAsArray pSQL, pVendorParamsA, pBindingsA, @pOutArray
Simple parameter. pSQL SQL query to execute.
Simple parameter. pVendorParamsA Array of parameters to use for executing the query. Valentina: location, lock type, direction.
Simple parameter. pBindingsA Array of values to bind to pSQL. Key "1" will replace ":1" in the query, etc. You can pass empty.
Simple parameter. @pOutArray Results will be put into this array. If the array already contains numeric keys then the results will be appended.
OptionalSimple parameter. [pConnName] The name of a Database Connection. The default is the "default connection" for the Database Object.
OptionalSimple parameter. [pDBKey] Database Object connection is associated with. Default is name returned by sqlyoga_getDefaultDatabase().

This handler will query a database and convert any returned records into a multi-dimensional array. Each row in the database cursor will be represented by a number in the first dimension. Each columnin each row will be contained in the second dimension for that number.

Example of what a cursor with 2 columns (name and email) and 2 rows:



Error message