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;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему