當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。