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


PHP Build::insert方法代碼示例

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


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

示例1: insert

function insert($details)
{
    $conn = new Connection("auto");
    $query = new Build();
    $result = $query->insert($conn->grab_conn(), $details, "close");
    return $result;
}
開發者ID:hazbo2,項目名稱:Outglow,代碼行數:7,代碼來源:omod_index.php

示例2: createOutOfOrder

 public static function createOutOfOrder($machine_id, $mode_id, $revision, $run_before_id, $run_after_id)
 {
     $run_before = new Run($run_before_id);
     $run_after = new Run($run_after_id);
     // Find the sorting order where we could add this revision;
     $sort_order = RunReporter::findSortOrder($run_before, $mode_id, $revision);
     // Get the approx stamp of the run with the sort_order before the one we are replacing.
     $old_run = Run::withMachineAndSortOrder($machine_id, $sort_order - 1);
     $approx_stamp = $old_run->approx_stamp();
     // sanity check.
     RunReporter::assertInBound($run_before, $run_after, $mode_id, $sort_order);
     // Create a space at the given sort_order, by shifting all sort_order,
     // equal or higher than the given sort_order.
     RunReporter::increaseNextSortOrder($machine_id, $sort_order);
     $run = Run::insert($machine_id, $sort_order, $approx_stamp);
     $run->updateInt("out_of_order", 1);
     $build = Build::insert($run, $mode_id, $revision);
     return $run;
 }
開發者ID:stoklund,項目名稱:arewefastyet,代碼行數:19,代碼來源:RunReporter.php

示例3: Run

if (GET_string("run") == 'addEngine') {
    $run = new Run(GET_int('runid'));
    $revision = GET_string('cset');
    $mode = Mode::FromMode(GET_string('name'));
    if ($run->isFinished() || $run->hasError()) {
        throw new Exception("Run was already finished or error'ed");
    }
    if ($run->isOutOfOrder()) {
        // out of order builds cannot add extra modes. The available
        // mode have already been added.
        if (!Build::withRunAndMode($run->id, $mode->id)) {
            $run->finish(0, "Tried to add extra modes to out of order run.");
        }
        die;
    }
    Build::insert($run, $mode->id, $revision);
    die;
}
// Report that a slave is still awake when there are no benchmarks results
// to send.
if (GET_string('awake') == 'yes') {
    $MACHINE = GET_int('MACHINE');
    mysql_query("UPDATE awfy_machine\n                 SET last_checked = UNIX_TIMESTAMP()\n                 WHERE id = {$MACHINE}") or die("ERROR: " . mysql_error());
    die;
}
// Report score of a benchmark total or subtest.
$run_id = GET_int('run');
$run = new Run($run_id);
if ($run->isFinished() || $run->hasError()) {
    throw new Error("Run was already finished or error'ed");
}
開發者ID:stoklund,項目名稱:arewefastyet,代碼行數:31,代碼來源:UPDATE.php


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