function data_node_get_nodes in Data 6
Get all available nodes for a specific table.
1 call to data_node_get_nodes()
- data_node_active_form in data_node/
data_node.module - Form callback for setting the active node.
File
- data_node/
data_node.module, line 339 - Hooks and API functions for Data Node module.
Code
function data_node_get_nodes($table) {
$nodes = array();
$meta = $table
->get('meta');
if ($meta['data_node']['content_type']) {
$result = db_query("SELECT nid, title FROM {node} WHERE type = '%s' ORDER BY title ASC", $meta['data_node']['content_type']);
while ($node = db_fetch_object($result)) {
$nodes[$node->nid] = $node->title;
}
}
return $nodes;
}