You are here : Cmysql/mysql.hmysql_num_rows

mysql_num_rows() - mysql/mysql.h

 Returns the number of rows in the result set.The use of mysql_num_rows()
        depends on whether you use
        mysql_store_result() or
        mysql_use_result() to return the
        result set. If you use
        mysql_store_result(),
        mysql_num_rows() may be called
        immediately. If you use
        mysql_use_result(),
        mysql_num_rows() does not return
        the correct value until all the rows in the result set have been
        retrieved.mysql_num_rows()mysql_num_rows()mysql_store_result()mysql_store_result()mysql_use_result()mysql_use_result()mysql_store_result()mysql_store_result()mysql_num_rows()mysql_num_rows()mysql_use_result()mysql_use_result()mysql_num_rows()mysql_num_rows()mysql_num_rows() is intended for
        use with statements that return a result set, such as
        SELECT. For statements such as
        INSERT,
        UPDATE, or
        DELETE, the number of affected
        rows can be obtained with
        mysql_affected_rows().mysql_num_rows()mysql_num_rows()SELECTSELECTINSERTINSERTUPDATEUPDATEDELETEDELETEmysql_affected_rows()mysql_affected_rows()


Syntax

my_ulonglong mysql_num_rows(MYSQL_RES
        *result)


Example

 


Output / Return Value

 The number of rows in the result set.


Limitations


Alternatives / See Also


Reference