maxdb_stmt_num_rows
stmt->num_rows
Return the number of rows in statements result set
Description
Procedural style :
intmaxdb_stmt_num_rows
resourcestmt
Object oriented style (property):
stmt
intnum_rows
Returns the number of rows in the result set.
Return values
An integer representing the number of rows in result set.
See also
maxdb_stmt_affected_rows,
maxdb_prepare,
maxdb_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 */
$maxdb->close();
?>
]]>
Procedural style
]]>
The above examples would produce the following output: