You are here

function node_gallery_get_list in Node Gallery 6.2

1 call to node_gallery_get_list()
node_gallery_edit_images_form in ./node_gallery.pages.inc

File

./node_gallery.inc, line 64
Node gallery models

Code

function node_gallery_get_list($type, $uid = NULL) {
  $sql = "SELECT n.nid, n.title FROM {node} n WHERE n.type = '%s'";
  $args[] = $type;
  if ($uid) {
    $sql .= " AND n.uid = %d ";
    $args[] = $uid;
  }
  $result = db_query($sql, $args);
  while ($r = db_fetch_array($result)) {
    $items[$r['nid']] = $r['title'];
  }
  return $items;
}