You are here

function library_get_items_group_by_node in Library 6

Same name and namespace in other branches
  1. 5.2 library.module \library_get_items_group_by_node()
  2. 6.2 library.module \library_get_items_group_by_node()
  3. 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()
library_display_items in ./library.pages.inc

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;
}