Commit 78027e1a authored by Dries's avatar Dries

- Patch #394616 by csevb10: converted to new database abstraction layer.

parent 1811d659
......@@ -2529,12 +2529,17 @@ function form_clean_id($id = NULL, $flush = FALSE) {
* if (empty($context['sandbox'])) {
* $context['sandbox']['progress'] = 0;
* $context['sandbox']['current_node'] = 0;
* $context['sandbox']['max'] = db_result(db_query('SELECT COUNT(DISTINCT nid) FROM {node}'));
* $context['sandbox']['max'] = db_query('SELECT COUNT(DISTINCT nid) FROM {node}')->fetchField();
* }
* $limit = 5;
* $result = db_query_range("SELECT nid FROM {node} WHERE nid > %d ORDER BY nid ASC", $context['sandbox']['current_node'], 0, $limit);
* while ($row = db_fetch_array($result)) {
* $node = node_load($row['nid'], NULL, TRUE);
* $result = db_select('node')
* ->fields('node', array('nid'))
* ->condition('nid', $context['sandbox']['current_node'], '>')
* ->orderBy('nid')
* ->range(0, $limit)
* ->execute();
* foreach ($result as $row) {
* $node = node_load($row->nid, NULL, TRUE);
* $context['results'][] = $node->nid . ' : ' . $node->title;
* $context['sandbox']['progress']++;
* $context['sandbox']['current_node'] = $node->nid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment