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.

dbcount

Counts records by $field (can be all fields if this value is (*) ) from $table in some $conditions (default no conditions) written in SQL syntax.

dbcount

Quote

dbcount ( string $field, string $table, [ string $conditions] )


Parameters
field
The fields you want to count in the database

table
The table you want to count from

conditions
The conditions you want to the results to match

Return Values
This function will return the number of rows in the $table matching the $conditions if any.
This function will return false if there are no rows or on failure.

Example
Code
<?php
echo dbcount("(field1)", "table1", "field1='this'");
?>


Changelog
7.01.00 - Added query count
7.00.00 - Removed db_prefix from the $table in order to use the multisite feature in PHPFusion 8

Note
This function will return false if the query fails or if there are no rows to count.