本文整理汇总了PHP中Dataset::getQuerySelectForAllDatasets方法的典型用法代码示例。如果您正苦于以下问题:PHP Dataset::getQuerySelectForAllDatasets方法的具体用法?PHP Dataset::getQuerySelectForAllDatasets怎么用?PHP Dataset::getQuerySelectForAllDatasets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dataset
的用法示例。
在下文中一共展示了Dataset::getQuerySelectForAllDatasets方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initDays
/**
* Init all days for beeing displayed
*/
protected function initDays()
{
$this->initShortModes();
$this->initEmptyDays();
$WhereNotPrivate = FrontendShared::$IS_SHOWN && !Configuration::Privacy()->showPrivateActivitiesInList() ? 'AND is_public=1' : '';
$AllTrainings = $this->DB->query('
SELECT
id,
time,
`s` as `s_sum_with_distance`,
DATE(FROM_UNIXTIME(time)) as `date`
' . $this->Dataset->getQuerySelectForAllDatasets() . '
FROM `' . PREFIX . 'training`
WHERE `time` BETWEEN ' . ($this->timestamp_start - 10) . ' AND ' . ($this->timestamp_end - 10) . '
AND accountid = ' . SessionAccountHandler::getId() . '
' . $WhereNotPrivate . '
ORDER BY `time` ASC
')->fetchAll();
foreach ($AllTrainings as $Training) {
$w = Time::diffInDays($Training['time'], $this->timestamp_start);
if (in_array($Training['sportid'], $this->sports_short) || in_array($Training['typeid'], $this->types_short)) {
$this->days[$w]['shorts'][] = $Training;
} else {
$this->days[$w]['trainings'][] = $Training;
}
}
}
示例2: searchTrainings
/**
* Search trainings
*/
private function searchTrainings()
{
$this->totalNumberOfTrainings = DB::getInstance()->query('SELECT COUNT(*) FROM `' . PREFIX . 'training` ' . $this->getWhere() . $this->getOrder() . ' LIMIT 1')->fetchColumn();
$this->page = (int) Request::param('page');
if (($this->page - 1) * $this->resultsPerPage > $this->totalNumberOfTrainings) {
$this->page--;
}
$this->Trainings = DB::getInstance()->query('SELECT
`id`,
`time`
' . ($this->multiEditorRequested() ? '' : $this->Dataset->getQuerySelectForAllDatasets()) . '
FROM `' . PREFIX . 'training`
' . $this->getWhere() . $this->getOrder() . $this->getLimit())->fetchAll();
}