当前位置: 首页>>代码示例>>PHP>>正文


PHP Dataset::getQuerySelectForAllDatasets方法代码示例

本文整理汇总了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;
            }
        }
    }
开发者ID:9x,项目名称:Runalyze,代码行数:30,代码来源:class.DataBrowser.php

示例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();
    }
开发者ID:9x,项目名称:Runalyze,代码行数:17,代码来源:class.SearchResults.php


注:本文中的Dataset::getQuerySelectForAllDatasets方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。