September 2001
Intermediate to advanced
768 pages
32h 45m
English
int odbc_num_rows(resource result) Displays rows from a query.
Returns:
Rows in a result set; -1 on error
Description:
Returns the numbers of rows in a result set. In a SELECT statement, this is the number of rows returned from the query. For UPDATE, INSERT, and DELETE statements, this is the number of affected rows. A lot of ODBC drivers don’t know how to handle this function properly and return a result of -1.
Version:
Existing since version 3.0.6
Example:
$db = odbc_connect("DSN","user","pass");
$sql = "SELECT * FROM Products";
$result = odbc_exec($db, $sql);
echo odbc_num_rows($result);
|
Read now
Unlock full access