Home | Previous Page | Next Page   Function Descriptions >

mi_result_row_count( )

The mi_result_row_count( ) function returns the number of rows affected by the current statement.

Syntax

mi_integer mi_result_row_count(conn)
   MI_CONNECTION *conn;
conn
is a pointer to a connection descriptor established by a previous call to mi_open( ), mi_server_connect( ), or mi_server_reconnect( ).
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_result_row_count( ) function returns the number of rows that the current statement on the connection that conn references has affected. The current statement is the most recently executed SQL statement sent to the database server on that connection. For example, if an UPDATE statement modifies three rows, a call to mi_result_row_count( ) returns 3. If a SELECT statement returns 531 rows, mi_result_row_count( ) returns 531.

Important:
Use the mi_result_row_count( ) function only after the mi_get_result( ) function returns MI_DML.

Return Values

>=0
is the number of rows affected.
MI_ERROR
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_get_result( ) and mi_result_command_name( ).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]