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


PHP DatabaseManager::get_record方法代碼示例

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


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

示例1: ctrace

}
if ($options['verbose']) {
    echo "parsing nodelist\n";
}
$nodes = vchamilo_parse_csv_nodelist($options['nodes'], $plugininstance);
if ($options['lint']) {
    ctrace("Lint mode:\n");
    print_object($nodes);
    die;
}
if (empty($nodes)) {
    cli_error('Node list empty');
}
ctrace('Starting generation');
// Get main admin for further replacement.
$admin = $DB->get_record('user', array('username' => 'admin'));
foreach ($nodes as $data) {
    ctrace('Making node ' . $data->root_web);
    if (!empty($data->template)) {
        ctrace('Using template ' . $data->template);
        if (!vchamilo_template_exists($data->template)) {
            ctrace('Template not found. Skipping node.');
            continue;
        }
    }
    if ($DB->get_record('vchamilo', array('root_web' => $data->root_web))) {
        ctrace('Node exists. skipping');
        continue;
    }
    $data->what = 'addinstance';
    $data->registeronly = false;
開發者ID:jloguercio,項目名稱:chamilo-lms,代碼行數:31,代碼來源:bulkcreatenodes.php

示例2: ctrace

if ($options['verbose']) {
    echo "parsing nodelist\n";
}
$nodes = vchamilo_parse_csv_nodelist($options['nodes'], $plugininstance);
if ($options['lint']) {
    ctrace("Lint mode:\n");
    print_object($nodes);
    die;
}
if (empty($nodes)) {
    cli_error(get_string('cliemptynodelist', 'block_vmoodle'));
}
ctrace('Starting CLI processing');
foreach ($nodes as $n) {
    ctrace('Destroying node :' . $n->vhostname);
    if (!$DB->get_record('vchamilo', array('root_web' => $n->root_web))) {
        ctrace('Node does not exist. Skipping');
        continue;
    }
    /*
     * This launches automatically all steps of the controller.management.php script several times
     * with the "doadd" action and progressing in steps.
     */
    $action = "fulldeleteinstances";
    $automation = true;
    $return = (include $_configuration['root_sys'] . '/plugin/vchamilo/views/manage.controller.php');
    if ($interactive) {
        $input = readline("Continue (y/n|r) ?\n");
        if ($input == 'r' || $input == 'R') {
            $vmoodlestep--;
        } elseif ($input == 'n' || $input == 'N') {
開發者ID:jloguercio,項目名稱:chamilo-lms,代碼行數:31,代碼來源:bulkdestroynodes.php


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