Skip navigation
Help

node_load

6 node.module node_load($param = array(), $revision = NULL, $reset = NULL)
7 node.module node_load($nid = NULL, $vid = NULL, $reset = FALSE)

Load a node object from the database.

Parameters

$nid: The node ID.

$vid: The revision ID.

$reset: Whether to reset the node_load_multiple cache.

Return value

A fully-populated node object.

115 calls to node_load()

File

drupal/modules/node/node.module, line 924
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

function node_load($nid = NULL, $vid = NULL, $reset = FALSE) {
  $nids = (isset($nid) ? array($nid) : array());
  $conditions = (isset($vid) ? array('vid' => $vid) : array());
  $node = node_load_multiple($nids, $conditions, $reset);
  return $node ? reset($node) : FALSE;
}