本文整理汇总了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();
}
示例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;
}
示例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();
示例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;
}
示例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);
}
}