title: How should I get the value contained in a particular field of a Drupal 7 custom node?
body: <p>What is the "proper" way to get the value stored in a particular field within a custom Drupal node? I've created a custom module, with a custom node, with a custom <em>URL</em> field. The following works:</p>
  
  <pre><code>$result = db_query("SELECT nid FROM {node} WHERE title = :title AND type = :type", array(
    ':title' =&gt; $title,
    ':type' =&gt; 'custom',
  ))-&gt;fetchField();
  $node = node_load($result);
  $url = $node-&gt;url['und']['0']['value'];
  </code></pre>
  
  <p>...but is there a better way, maybe using the new Field API functions?</p>