mysqli_stmt_num_rows stmt->num_rows Return the number of rows in statements result set Description Procedural style : mixedmysqli_stmt_num_rows objectstmt Object oriented style (property): stmt intnum_rows Returns the number of rows in the result set. The use of mysqli_stmt_num_rows depends on whether or not you used mysqli_stmt_store_result to buffer the entire result set in the statement handle. If you use mysqli_stmt_store_result, mysqli_stmt_num_rows may be called immediately. Return values An integer representing the number of rows in result set. See also mysqli_stmt_affected_rows, mysqli_prepare, mysqli_stmt_store_result Example Object oriented style prepare($query)) { /* execute query */ $stmt->execute(); /* store result */ $stmt->store_result(); printf("Number of rows: %d.\n", $stmt->num_rows); /* close statement */ $stmt->close(); } /* close connection */ $mysqli->close(); ?> ]]> Procedural style ]]> The above examples would produce the following output: