Node
Node_load ($nid = null, $vid = null, $reset = FALSE);
Node_load_multiple ($nids = Array (), $conditions = Array (), $reset = FALSE);
User
User_load ($uid, $reset = FALSE);
User_load_multiple ($uids = Array (), $conditions = Array (), $reset = FALSE);
Menu Tree
Menu_tree_all_data ($menu _name, $link = null, $max _depth = null);
Menu_tree_page_data ($menu _name, $max _depth = NULL, $only _active_trail = FALSE);
Term
Taxonomy_term_load ($tid): Object
Taxonomy_term_load_multiple ($tids = Array (), $conditions = Array ()): array
Taxonomy_get_tree ($vid, $parent = 0, $max _depth = NULL, $load _entities = FALSE): array
Block
Block_load ($module, $delta);
Pager
Db_select (' node ', ' n ')
->extend (' Pagerdefault ')->limit (5)
->fields (' n ');
$statement->fetchfield ();
Db_query_range (' SELECT N.nid, N.title, n.created
from {node} n WHERE n.uid =: Uid ', 0, Array (': uid ' = = $uid));
Insert
$fields = Array (' nid ' = 1, ' title ' = ' My title ', ' body ' = ' my Body ');
Db_insert (' node ')->fields ($fields)->execute ();
Update
Db_update (' example ')
->condition (' id ', $id)
->fields (Array (' field2 ' = 10))
->execute ();
Select
$query = db_select (' comment ', ' C ')
->fields (' C ', array (' Subject ', ' name '))
->fields (' n ', Array (' title '))
->extend (' Pagerdefault ')->limit (5)
->condition (' N.type ', Array (' article '), ' in ')
->orderby (' c.cid ', ' DESC ');
$query->join (' node ', ' n ', ' N.nid = C.nid ');
$statement = $query->execute ();
$query = Db_select (' node ', ' n ')->fields (' n ', Array (' title '))->distinct ();
$query->join (' Taxonomy_index ', ' t ', ' T.nid = N.nid ');
$or = Db_or ()->condition (' N.uid ', $authorId)->condition (' T.tid ', $cats, ' in ');
$query->condition ($or)->execute ();
Fetch
foreach ($query->execute () as $object) {
Echo $object->name;
}
Http://api.drupal.org/api/drupal/includes--database--database.inc/interface/DatabaseStatementInterface/7
Drupal to database operations