ph_sqlselect PowerHome formula function
Description
Selects data from the PowerHome database into a data retrieval area.
Syntax
ph_sqlselect ( n, s )
Argument Description
n The number of the data retrieval area you would like to create and select into. Valid values are 1 thru 20.
s A string representing a valid SQL select statement.
Return value
Integer. Returns a 0 if successful. A 1 will be returned if an invalid data retrieval area is specified. A 2 will be returned if selects against the REGINFO table are performed. A 3 is returned if the SQL code is not valid. A 4 is returned if an error occurs while trying to create the query. If the function is successful, the system variable SQLROWS# will be updated with the number of rows the select returned. You can then use the other PowerHome functions such as ph_getdata to access the data in the data retrieval area. Be sure and destroy a data retrieval area when you are done using it so that the memory will be released.