當前位置: 首頁>>代碼示例>>PHP>>正文


PHP POD::free方法代碼示例

本文整理匯總了PHP中POD::free方法的典型用法代碼示例。如果您正苦於以下問題:PHP POD::free方法的具體用法?PHP POD::free怎麽用?PHP POD::free使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在POD的用法示例。


在下文中一共展示了POD::free方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: close

 function close()
 {
     if (isset($this->_result)) {
         POD::free($this->_result);
         unset($this->_result);
     }
     $this->_count = 0;
     $this->reset();
 }
開發者ID:webhacking,項目名稱:Textcube,代碼行數:9,代碼來源:Textcube.Data.GuestComment.php

示例2: load

 function load()
 {
     global $database;
     $this->reset();
     if ($result = POD::query("SELECT visits FROM {$database['prefix']}BlogStatistics WHERE blogid = " . getBlogId())) {
         if ($row = POD::fetch($result)) {
             foreach ($row as $name => $value) {
                 if ($name == 'owner') {
                     continue;
                 }
                 $this->{$name} = $value;
             }
             POD::free($result);
             return true;
         }
         POD::free($result);
     }
     return false;
 }
開發者ID:Avantians,項目名稱:Textcube,代碼行數:19,代碼來源:Textcube.Data.BlogStatistics.php

示例3: trashCommentInOwner

                trashCommentInOwner($blogid, $comment['id']);
            }
        }
    }
    POD::free($result);
}
if ($result = POD::query("SELECT id, url, site, subject, excerpt FROM {$database['prefix']}RemoteResponses WHERE blogid = {$blogid}")) {
    while ($trackback = POD::fetch($result)) {
        setProgress($item++ / $items * 100, _t('걸린 글 데이터를 교정하고 있습니다.'));
        $correction = '';
        if (!Utils_Unicode::validate($trackback['url'])) {
            $correction .= ' url = \'' . POD::escapeString(Utils_Unicode::correct($trackback['url'], '?')) . '\'';
        }
        if (!Utils_Unicode::validate($trackback['site'])) {
            $correction .= ' site = \'' . POD::escapeString(Utils_Unicode::correct($trackback['site'], '?')) . '\'';
        }
        if (!Utils_Unicode::validate($trackback['subject'])) {
            $correction .= ' subject = \'' . POD::escapeString(Utils_Unicode::correct($trackback['subject'], '?')) . '\'';
        }
        if (!Utils_Unicode::validate($trackback['excerpt'])) {
            $correction .= ' excerpt = \'' . POD::escapeString(Utils_Unicode::correct($trackback['excerpt'], '?')) . '\'';
        }
        if (strlen($correction) > 0) {
            POD::query("UPDATE {$database['prefix']}RemoteResponses SET {$correction} WHERE blogid = {$blogid} AND id = {$trackback['id']}");
            $corrected++;
        }
    }
    POD::free($result);
}
setProgress(100, _t('완료되었습니다.') . "({$corrected})");
finish();
開發者ID:Avantians,項目名稱:Textcube,代碼行數:31,代碼來源:index.php

示例4: checkTables

function checkTables($version, $prefix)
{
    if (!($tables = getTables($version, $prefix))) {
        return false;
    }
    foreach ($tables as $table) {
        if ($result = POD::query("DESCRIBE {$table}")) {
            POD::free($result);
        } else {
            return false;
        }
    }
    return true;
}
開發者ID:hoksi,項目名稱:Textcube,代碼行數:14,代碼來源:setup.php

示例5: correctTagsAll

 function correctTagsAll()
 {
     global $database;
     $targetresult = POD::query("SELECT * FROM {$database['prefix']}TagRelations");
     if ($targetresult != false) {
         while ($target = POD::fetch($targetresult)) {
             $oldtag = POD::queryRow("SELECT id, name FROM {$database['prefix']}Tags WHERE id = {$target['tag']}");
             if (!is_null($oldtag)) {
                 $tagid = POD::queryCell("SELECT id FROM {$database['prefix']}Tags WHERE name = '" . POD::escapeString($oldtag['name']) . "' LIMIT 1 ");
                 if (is_null($tagid)) {
                     POD::execute("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = {$target['blogid']} AND tag = {$target['tag']} AND entry = {$target['entry']}");
                 } else {
                     if ($tagid == $oldtag['id']) {
                         continue;
                     }
                     if (POD::execute("UPDATE {$database['prefix']}TagRelations SET tag = {$tagid} WHERE blogid = {$target['blogid']} AND tag = {$target['tag']} AND entry = {$target['entry']}") == false) {
                         // maybe duplicated tag
                         POD::execute("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = {$target['blogid']} AND tag = {$target['tag']} AND entry = {$target['entry']}");
                     }
                 }
             } else {
                 // Ooops!
                 POD::execute("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = {$target['blogid']} AND tag = {$target['tag']} AND entry = {$target['entry']}");
             }
         }
         POD::free($targetresult);
     }
     $targetresult = POD::query("SELECT id FROM {$database['prefix']}Tags LEFT JOIN {$database['prefix']}TagRelations ON id = tag WHERE tag IS NULL");
     if ($targetresult != false) {
         while ($target = POD::fetch($targetresult)) {
             $tag = $target['id'];
             POD::execute("DELETE FROM {$database['prefix']}Tags WHERE id = {$tag} ");
         }
         POD::free($targetresult);
     }
 }
開發者ID:ragi79,項目名稱:Textcube,代碼行數:36,代碼來源:Textcube.Data.Post.php


注:本文中的POD::free方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。