本文整理汇总了PHP中Source::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Source::load方法的具体用法?PHP Source::load怎么用?PHP Source::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Source
的用法示例。
在下文中一共展示了Source::load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ini_set
<?php
require_once "../../phplib/util.php";
ini_set('max_execution_time', '3600');
assert_options(ASSERT_BAIL, 1);
debug_off();
$mdnSrc = Source::load(21);
$query = "select Id, md5(InternalRep) as m from Definition " . "where Status = 0 order by m, Id";
$dbResult = mysql_query($query);
$prevId = 0;
$prevMd5 = 'xyz';
while ($dbRow = mysql_fetch_assoc($dbResult)) {
$id = $dbRow['Id'];
$md5 = $dbRow['m'];
if ($md5 == $prevMd5) {
print "Definition {$id} is identical to {$prevId}\n";
assert(mysql_query("delete from Comment where DefinitionId = {$id}"));
assert(mysql_query("delete from LexemDefinitionMap where DefinitionId = {$id}"));
assert(mysql_query("delete from Definition where Id = {$id}"));
} else {
$prevId = $id;
$prevMd5 = $md5;
}
}
示例2: source_exists
function source_exists($sourceId)
{
if ($sourceId == "*" || $sourceId == '!') {
return true;
}
$s = new Source();
$s->load("id={$sourceId}");
return $s->id;
}