Functions - 7.x - drupal

Primary tabs

Title Deprecated File name Summary Direct uses Strings
db_create_table includes/database/database.inc Creates a new table from a Drupal table definition. 37
db_delete includes/database/database.inc Returns a new DeleteQuery object for the active database. 3
db_driver includes/database/database.inc Retrieves the name of the currently active database driver. 2
db_drop_field includes/database/database.inc Drops a field. 19
db_drop_index includes/database/database.inc Drops an index. 22
db_drop_primary_key includes/database/database.inc Drops the primary key of a database table. 8
db_drop_table includes/database/database.inc Drops a table. 25
db_drop_unique_key includes/database/database.inc Drops a unique key. 6
db_escape_field includes/database/database.inc Restricts a dynamic column or constraint name to safe characters.
db_escape_table includes/database/database.inc Restricts a dynamic table name to safe characters. 1
db_field_exists includes/database/database.inc Checks if a column exists in the given table. 8
db_field_names includes/database/database.inc Returns an array of field names from an array of key/index column specifiers.
db_field_set_default includes/database/database.inc Sets the default value for a field. 1
db_field_set_no_default includes/database/database.inc Sets a field to have no default value. 1
db_find_tables includes/database/database.inc Finds all tables that are like the specified base table name.
db_find_tables_d8 includes/database/database.inc Finds all tables that are like the specified base table name. This is a backport of the change made to db_find_tables in Drupal 8 to work with virtual, un-prefixed table names. The original function is retained for Backwards Compatibility. 3
db_ignore_slave includes/database/database.inc Sets a session variable specifying the lag time for ignoring a slave server. 2
db_index_exists includes/database/database.inc Checks if an index exists in the given table. 9
db_insert includes/database/database.inc Returns a new InsertQuery object for the active database. 3
db_installer_object includes/install.inc Returns a database installer object. 1
db_like includes/database/database.inc Escapes characters that work as wildcard characters in a LIKE pattern. 6
db_merge includes/database/database.inc Returns a new MergeQuery object for the active database.
db_next_id includes/database/database.inc Retrieves a unique id. 4
db_or includes/database/database.inc Returns a new DatabaseCondition, set to "OR" all conditions together. 9
db_query includes/database/database.inc Executes an arbitrary query string against the active database. 133 2
db_query_range includes/database/database.inc Executes a query against the active database, restricted to a range. 13 1
db_query_temporary includes/database/database.inc Executes a SELECT query string and saves the result set to a temporary table. 2
db_rename_table includes/database/database.inc Renames a table. 14
db_run_tasks includes/install.inc Ensures the environment for a Drupal database on a predefined connection. 2
db_select includes/database/database.inc Returns a new SelectQuery object for the active database. 115
db_set_active includes/database/database.inc Sets a new active database. 2
db_table_exists includes/database/database.inc Checks if a table exists. 24
db_transaction includes/database/database.inc Returns a new transaction object for the active database. 17
db_truncate includes/database/database.inc Returns a new TruncateQuery object for the active database. 1
db_update includes/database/database.inc Returns a new UpdateQuery object for the active database. 2
db_xor includes/database/database.inc Returns a new DatabaseCondition, set to "XOR" all conditions together.
debug includes/common.inc Outputs debug information. 1 13
decode_entities includes/unicode.inc Decodes all HTML entities (including numerical ones) to regular UTF-8 bytes. 16 1
drupal_access_denied includes/common.inc Delivers an "access denied" error to the browser. 7
drupal_add_css includes/common.inc Adds a cascading stylesheet to the stylesheet queue. 43 3
drupal_add_feed includes/common.inc Adds a feed URL for the current page. 9
drupal_add_html_head includes/common.inc Adds output to the HEAD tag of the HTML page. 7
drupal_add_html_head_link includes/common.inc Adds a LINK tag with distinct attributes to the page's HEAD. 9
drupal_add_http_header includes/bootstrap.inc Sets an HTTP response header for the current page. 28
drupal_add_js includes/common.inc Adds a JavaScript file, setting, or inline code to the page. 51 8
drupal_add_library includes/common.inc Adds multiple JavaScript or CSS files at the same time. 13 3
drupal_add_region_content includes/common.inc Adds content to a specified region. 5
drupal_add_tabledrag includes/common.inc Assists in adding the tableDrag JavaScript behavior to a themed table. 16
drupal_aggregate_css includes/common.inc Default callback to aggregate CSS files and inline content. 1
drupal_alter includes/module.inc Passes alterable variables to specific hook_TYPE_alter() implementations. 94 3

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.