function library_get_items_group_by_node in Library 6
Same name and namespace in other branches
- 5.2 library.module \library_get_items_group_by_node()
- 6.2 library.module \library_get_items_group_by_node()
- 7 library.module \library_get_items_group_by_node()
Get a list of all library item nodes
Return value
An array of library items
1 call to library_get_items_group_by_node()
File
- ./
library.module, line 1204
Code
function library_get_items_group_by_node() {
$count_select = "SELECT COUNT(*) FROM {node} WHERE status = 1 AND nid IN (SELECT nid from {library}) ORDER BY title";
$result = pager_query("SELECT nid FROM {node} WHERE status = 1 AND nid IN (SELECT nid from {library}) ORDER BY title", LIBRARY_RESULTS_PER_PAGE, 0, $count_select);
$nodes = array();
while ($node = db_fetch_object($result)) {
$nodes[] = node_load($node->nid);
}
return $nodes;
}