Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
API CHANGE: db_count() returns integer
[wfpl.git]
/
db.php
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;
}
return $value;
}
+# returns an integer
function db_count($table, $where = '') {
$args = func_get_args();
array_splice($args, 1, 0, array('count(*)'));
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:
}
# call either of these ways: