hanaclient_get_column Function
Returns the value fetched for the specified column.
Parameters
- $stmt
-
A statement object that was executed by hanaclient_execute or hanaclient_execute_direct.
- $col_index
-
The number of the column to be retrieved between 0 and hanaclient_num_cols() - 1.
Returns
Returns a two-element array where the first element is 1 on success or 0 on failure and the second element is the column value.
Example
stmt = api.hanaclient_execute_direct( conn, "SELECT * FROM "Products"" )
# Fetch the second row
rc = api.hanaclient_fetch_next( stmt )
rc, employeeID = api.hanaclient_get_column( stmt, 0 )
rc, managerID = api.hanaclient_get_column( stmt, 1 )
rc, surname = api.hanaclient_get_column( stmt, 2 )
rc, givenName = api.hanaclient_get_column( stmt, 3 )
rc, departmentID = api.hanaclient_get_column( stmt, 4 )
print employeeID, ",", managerID, ",",
surname, ",", givenName, ",", departmentID, "\n"