From c82d62dd4f5c3af92841ccc7cc2b298fbabcf6ef Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Thu, 26 Mar 2015 23:02:06 -0400 Subject: [PATCH] API CHANGE: db_count() returns integer --- db.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db.php b/db.php index 9540220..14787ac 100644 --- a/db.php +++ b/db.php @@ -265,10 +265,11 @@ function db_get_value($table, $column, $where = '') { return $value; } +# returns an integer function db_count($table, $where = '') { $args = func_get_args(); array_splice($args, 1, 0, array('count(*)')); - return call_user_func_array('db_get_value', $args); + return (int) call_user_func_array('db_get_value', $args); } # call either of these ways: -- 1.7.10.4