Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.
dbrows
This function will give you the total number of rows in a given database query. This is often used to check for rows in a result before displaying content.

dbrows

Quote

dbrows ( resource $query )


Parameters
query
The query resource that is being evaluated. This result comes from a call to dbquery().

Return Values
The number of rows in a result set on success, or FALSE on failure.

Example
Code
<?php
$result = dbquery("SELECT * FROM table1", $link);
$num_rows = dbrows($result);
 
echo "$num_rows Rows\n";
?>


Notes
This function alone will not output anything.


See also …


References

  • 1. ^ dbrows by , retrieved 11/07/2014