}
function db_count($table, $where = '') {
- return db_get_value($table, 'count(*)', $where);
+ $args = func_get_args();
+ array_splice($args, 1, 0, array('count(*)'));
+ return call_user_func_array('db_get_value', $args);
}
# call either of these ways:
return ereg_replace('^0', '', strftime('%m'));
}
+# return today's date in yyyy-mm-dd format
+function today_ymd() {
+ return strftime('%Y-%m-%d');
+}
# php4 is broken, in that you cannot set a default value for a parameter that
# is passed by reference. So, this is set up to use the following screwy
$GLOBALS['session_key'] = $session_key;
$_REQUEST['session_key'] = $session_key; #just in case someone calls session_exists() after session_new()
session_touch($length);
+ return $GLOBALS['session_key'];
}
# call to renew the timeout for the session.