batch_example_batch_1
developer/examples/batch_example.module, строка 156
- Версии
- 6
batch_example_batch_1()
Batch 1 : Load 100 times the node with the lowest nid
Связанные темы
Код
<?php
function batch_example_batch_1() {
$nid = db_result(db_query_range("SELECT nid FROM {node} ORDER BY nid ASC", 0, 1));
$operations = array();
for ($i = 0; $i<100; $i++) {
$operations[] = array('batch_example_op_1', array($nid));
}
$batch = array(
'operations' => $operations,
'finished' => 'batch_example_finished',
);
return $batch;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии