hanaclient_fetch_absolute Function
Moves the current row in the result set to the row number specified and then fetches the data from that row.
Parameters
- $stmt
-
A statement object that was executed by hanaclient_execute or hanaclient_execute_direct.
- $row_num
-
The row number to be fetched. The first row is 1, the last row is -1.
Returns
Returns a scalar value that is 1 on success or 0 on failure.
Example
stmt = api.hanaclient_execute_direct( conn, "SELECT * FROM "Products"" )
# Fetch the second row
rc = api.hanaclient_fetch_absolute( stmt, 2 )
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"