SQL Yoga version 1.1.0 build 4 :: Visit website

Printer friendly version

command sqlquery_retrieveAsArray

Executes a SQL Query Object query and returns the result as an array.

command sqlquery_retrieveAsArray @pQueryA, @pOutArray
Parameters
TypeNameDescription
Simple parameter. @pQueryA A SQL Query Object array as created using sqlquery_createObject().
[Pointer] Write only variable. @pOutArray Upon completion holds a numerically indexed array. The keys are column names and values are column values. If pOutArray already contains numerical indexes then this command will add the returned records to the end.
Description

This handler will execute the query property of a SQL Query OBject and convert any returned recordsinto a multi-dimensional array. Each row in the database cursor will be represented by a number in the first dimension. Each column in 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:

theDataA[1]["name"] 
theDataA[1]["email"]
theDataA[2]["name"]
theDataA[2]["email"]

Return

Error message