本文整理匯總了PHP中Piwik\Db::segmentedFetchAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP Db::segmentedFetchAll方法的具體用法?PHP Db::segmentedFetchAll怎麽用?PHP Db::segmentedFetchAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Piwik\Db
的用法示例。
在下文中一共展示了Db::segmentedFetchAll方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: findSegmentArchives
/**
* If we're going to keep segmented reports, we need to know which archives are
* for segments. This info is only in the numeric tables, so we must query them.
*/
private function findSegmentArchives($numericTables)
{
if (!is_null($this->segmentArchiveIds)) {
return;
}
foreach ($numericTables as $table) {
$tableDate = ArchiveTableCreator::getDateFromTableName($table);
$maxIdArchive = Db::fetchOne("SELECT MAX(idarchive) FROM {$table}");
$sql = "SELECT idarchive\n\t\t\t\t\t FROM {$table}\n\t\t\t\t\t WHERE name != 'done'\n\t\t\t\t\t AND name LIKE 'done_%.%'\n\t\t\t\t\t AND idarchive >= ?\n\t\t\t\t\t AND idarchive < ?";
$this->segmentArchiveIds[$tableDate] = array();
foreach (Db::segmentedFetchAll($sql, 0, $maxIdArchive, self::$selectSegmentSize) as $row) {
$this->segmentArchiveIds[$tableDate][] = $row['idarchive'];
}
}
}