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