Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5400a0
)
API CHANGE: db_count() returns integer
author
Jason Woofenden
<jason@jasonwoof.com>
Fri, 27 Mar 2015 03:02:06 +0000
(23:02 -0400)
committer
Jason Woofenden
<jason@jasonwoof.com>
Fri, 27 Mar 2015 03:02:06 +0000
(23:02 -0400)
db.php
patch
|
blob
|
history
diff --git
a/db.php
b/db.php
index
9540220
..
14787ac
100644
(file)
--- 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: