本文整理匯總了PHP中owa_coreAPI::makeTimePeriod方法的典型用法代碼示例。如果您正苦於以下問題:PHP owa_coreAPI::makeTimePeriod方法的具體用法?PHP owa_coreAPI::makeTimePeriod怎麽用?PHP owa_coreAPI::makeTimePeriod使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類owa_coreAPI
的用法示例。
在下文中一共展示了owa_coreAPI::makeTimePeriod方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: action
function action()
{
$db = owa_coreAPI::dbSingleton();
$db->selectColumn("distinct session.visitor_id as visitor_id, visitor.user_name, visitor.user_email");
$db->selectFrom('owa_session', 'session');
$db->join(OWA_SQL_JOIN_LEFT_OUTER, 'owa_visitor', 'visitor', 'visitor_id', 'visitor.id');
$db->where('site_id', $this->getParam('site_id'));
// make new timeperiod of a day
$period = owa_coreAPI::makeTimePeriod('day', array('startDate' => $this->getParam('first_session')));
$start = $period->getStartDate();
$end = $period->getEndDate();
//print_r($period);
// set new period so lables show up right.
$db->where('first_session_timestamp', array('start' => $start->getTimestamp(), 'end' => $end->getTimestamp()), 'BETWEEN');
$ret = $db->getAllRows();
$this->set('visitors', $ret);
$this->setSubview('base.reportVisitorsRoster');
$this->setTitle('New Visitors from', $period->getStartDate()->label);
}
示例2: makeTimePeriod
function makeTimePeriod($time_period, $params = array())
{
return owa_coreAPI::makeTimePeriod($time_period, $params);
}