Brimbox Logo Brimbox Version 2.3.4 Released


This function outputs the total row count of a given query, along with the date and time the query was executed.

Class: bb_main, called as $main

File: bb_main.php (php)


function return_stats($result)



Outputs: Count of records returned by query and date and time of query execution.

Parameter: $result (db resultset)
Query $result must contain column called cnt having the count of total rows returned in query not defined by LIMIT or OFFSET.

Example Query:
SELECT count(*) OVER () as cnt, *
FROM data_table WHERE row_type = 1 LIMIT 10 OFFSET 0

Updated: 2016-06-16