node_example_load
Definition
node_example_load($node)
developer/examples/node_example.module, line 234
Description
Implementation of hook_load().
Now that we've defined how to manage the node data in the database, we need to tell Drupal how to get the node back out. This hook is called every time a node is loaded, and allows us to do some loading of our own.
Code
<?php
function node_example_load($node) {
$additions = db_fetch_object(db_query('SELECT color, quantity FROM {node_example} WHERE vid = %d', $node->vid));
return $additions;
}
?> 