本文整理汇总了PHP中action::summarize方法的典型用法代码示例。如果您正苦于以下问题:PHP action::summarize方法的具体用法?PHP action::summarize怎么用?PHP action::summarize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类action
的用法示例。
在下文中一共展示了action::summarize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: summarizeMonthlyActions
/**
* @brief summarize monthly actions
*/
function summarizeMonthlyActions() {
require_once 'include/action.php';
$action = new action();
Database::get()->queryFunc("SELECT id FROM course", function($course) use (&$action) {
$min_time = ($res = Database::get()->querySingle("SELECT MIN(day) as min_time FROM actions_daily WHERE course_id = ?d", intval($course->id))) ? $res->min_time : time();
if ($min_time + get_config('actions_expire_interval') * 30 * 24 * 3600 < time()) {
$action->summarize($course->id);
}
});
}
示例2: MIN
$u_date_end = $date_end->format('Y-m-d H:i');
$user_date_end = $date_end->format('d-m-Y H:i');
}
$result = Database::get()->queryArray("SELECT MIN(day) AS min_time FROM actions_daily WHERE course_id = ?d", $course_id);
foreach ($result as $row) {
if (!empty($row->min_time)) {
$min_time = strtotime($row->min_time);
} else
break;
}
if ($min_time + get_config('actions_expire_interval') * 30 * 24 * 3600 < time()) { // actions more than X months old
$action = new action();
$action->summarize(); // move data to action_summary
}
$result = Database::get()->queryArray("SELECT MIN(day) AS min_time FROM actions_daily WHERE course_id = ?d", $course_id);
foreach ($result as $row) {
if (!empty($row->min_time)) {
$min_time = strtotime($row->min_time);
} else
break;
}
$min_t = date("d-m-Y", $min_time);
$made_chart = true;
//make chart
require_once 'modules/graphics/plotter.php';