You are here

function recipe_get_alpha_nodes in Recipe 6

Get recipes that have these ingredients.

Return value

A database query result suitable for use the node_title_list.

1 call to recipe_get_alpha_nodes()
recipe_name_index_page in ./recipe_name_index.inc
@file recipe_name_index.inc - This is an include file containing most all of the recipe name index page functionality.

File

./recipe_name_index.inc, line 82
recipe_name_index.inc - This is an include file containing most all of the recipe name index page functionality.

Code

function recipe_get_alpha_nodes() {
  $list = array();
  $result = db_query(db_rewrite_sql("SELECT DISTINCT n.nid, n.title, n.sticky FROM {node} n WHERE n.type='recipe' AND n.status=1 ORDER BY n.title, n.sticky DESC"));
  while ($node = db_fetch_object($result)) {
    $list[] = $node;
  }
  return $list;
}