Location: PHPKode > projects > PhpBlock > A9.8/modules/basicfog/test/updatefow.php
<?php
include_once "allinclude.php";

Log::getInstance()->isDebugOn = True;

executer("DELETE FROM fowBlockSeeByAlliance");
executer("DELETE FROM fowBlockSeeByObject");
/*
$res=executer("SELECT allianceId, objectId, blockId FROM object");
while($row=mysql_fetch_array($res)) {
    $locAllianceId=$row[0];
    $locObjectId=$row[1];
    $locBlockId=$row[2];
    executer("INSERT INTO fowBlockSeeByObject(blockId, objectId) SELECT blockId, $locObjectId FROM block WHERE blockId IN ".Block::getStaticBlockIdsWhereClauseList($locBlockId, 1, 1, 1));
    executer("REPLACE INTO fowBlockSeeByAlliance(blockId, allianceId) SELECT blockId, $locAllianceId FROM block WHERE blockId IN ".Block::getStaticBlockIdsWhereClauseList($locBlockId, 1, 1, 1));
}
$res=executer("SELECT allianceId, blockId FROM block LEFT JOIN player USING (allianceId) WHERE allianceId > 0");
while($row= mysql_fetch_array($res)) {
    $locAllianceId=$row[0];
    $locBlockId=$row[1];
    executer("REPLACE INTO fowBlockSeeByAlliance(blockId, allianceId) VALUES($locBlockId, $locAllianceId)");
}*/
disconnect();
?>
Return current item: PhpBlock