batch_example_batch_1
Definition
batch_example_batch_1()
developer/examples/batch_example.module, line 153
Description
Batch 1 : Load 100 times the node with the lowest nid
Related topics
| Name | Description |
|---|---|
| Example batch definitions | Definitions of the batches used in this module. |
Code
<?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;
}
?> 