rows
(/rs/public/functions.mysql.php)
rows -- Rows contained in or affected by a query.
Description
int rows
($data)
This function will return the number of rows in a result resource if one is given via $data. If an invailid or no resource is given, it will return the number of rows affected by the last query.
This function returns NULL on failure.
Examples
$data = data ("* FROM table") ;
rows ($data) /* This will return the total number of rows in table */
query ("UPDATE table SET foo = bar")
rows () /* This will return the number of rows updated in the previous query. */
Related Functions
None.
Dependencies
None.
Function Index
|