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


PHP Settings::queryAssoc方法代码示例

本文整理汇总了PHP中newznab\db\Settings::queryAssoc方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::queryAssoc方法的具体用法?PHP Settings::queryAssoc怎么用?PHP Settings::queryAssoc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在newznab\db\Settings的用法示例。


在下文中一共展示了Settings::queryAssoc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: time

$begintime = time();
echo "Creating new binaries, and parts tables for each active group...\n";
foreach ($actgroups as $group) {
    if ($groups->createNewTPGTables($group['id']) === false) {
        exit($pdo->log->error("There is a problem creating new parts/files tables for group {$group['name']}."));
    }
    $consoletools->overWrite("Tables Created: " . $consoletools->percentString($gdone * 3, $newtables));
    $gdone++;
}
$endtime = time();
echo "\nTable creation took " . $consoletools->convertTime($endtime - $begintime) . ".\n";
$starttime = time();
echo "\nNew tables created, moving data from old tables to new tables.\nThis will take awhile....\n\n";
while ($bdone < $blen['total']) {
    // Only load 1000 binaries per loop to not overload memory.
    $binaries = $pdo->queryAssoc('SELECT * FROM binaries LIMIT ' . $bdone . ',1000;');
    if ($binaries instanceof \Traversable) {
        foreach ($binaries as $binary) {
            $binary['name'] = $pdo->escapeString($binary['name']);
            $binary['fromname'] = $pdo->escapeString($binary['fromname']);
            $binary['date'] = $pdo->escapeString($binary['date']);
            $binary['binaryhash'] = $pdo->escapeString($binary['binarynhash']);
            $binary['dateadded'] = $pdo->escapeString($binary['dateadded']);
            $binary['xref'] = $pdo->escapeString($binary['xref']);
            $binary['releaseid'] = $pdo->escapeString($binary['releaseid']);
            $binary['categoryid'] = $pdo->escapeString($binary['categoryid']);
            $binary['totalparts'] = $pdo->escapeString($binary['totalparts']);
            $binary['relpart'] = $pdo->escapeString($binary['relpart']);
            $binary['reltotalpart'] = $pdo->escapeString($binary['reltotalpart']);
            $oldbid = array_shift($binary);
            if ($debug) {
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:31,代码来源:convert_to_tpg.php


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