sqlany_num_cols

Returns number of columns in the result set.

Syntax
sqlany_num_cols ( $stmt )
Parameters
  • $stmt   A statement object executed by sqlany_execute or sqlany_execute_direct.

Returns

Returns a scalar value that is the number of columns in the result set, or -1 on a failure.

See also
Example
stmt = api.sqlany_execute_direct( conn, "SELECT * FROM Employees" )
# Get number of result set columns
num_cols = api.sqlany_num_cols( stmt )