Drupal Database API

查询的API:

http://api.drupal.org/api/drupal/includes!database!select.inc/class/SelectQuery/7

 
DB类:
http://api.drupal.org/api/drupal/includes!database!database.inc/group/database/7
 

Develop Database API:

http://drupal.org/developing/api/database

 
Schema:
http://drupal.org/node/146843

http://drupal.org/node/150223
Data Type: http://drupal.org/node/159605

API: http://api.drupal.org/api/drupal/includes%21database%21schema.inc/group/schemaapi/7

常用函数:

drupal_write_record('tablename','filed_array', $primary_keys) //添加数据, $primary_keys如果是空表示是添加数据,如果有字段。按字段条件更新数据
drupal_get_schema($table);    //根据表名获取这个表里面的所有字段