db_insert

Versions
mediamosa-21
db_insert($table, array $options = array())

Returns a new InsertQuery object for the active database.

Parameters

$table The table into which to insert.

$options An array of options to control how the query operates.

Return value

InsertQuery A new InsertQuery object for this connection.

Related topics

▾ 92 functions call db_insert()

actions_synchronize in includes/actions.inc
Synchronizes actions that are provided by modules in hook_action_info().
aggregator_categorize_items_submit in modules/aggregator/aggregator.pages.inc
Process aggregator_categorize_items() form submissions.
aggregator_save_category in modules/aggregator/aggregator.module
Add/edit/delete aggregator categories.
aggregator_save_feed in modules/aggregator/aggregator.module
Add/edit/delete an aggregator feed.
aggregator_save_item in modules/aggregator/aggregator.processor.inc
Add/edit/delete an aggregator item.
batch_process in includes/form.inc
Processes the batch.
block_add_block_form_submit in modules/block/block.admin.inc
Save the new custom block.
block_admin_configure_submit in modules/block/block.admin.inc
block_update_7004 in modules/block/block.install
Add new blocks to new regions, migrate custom variables to blocks.
comment_enable in modules/comment/comment.install
Implements hook_enable().
comment_node_insert in modules/comment/comment.module
Implements hook_node_insert().
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.
comment_update_7013 in modules/comment/comment.install
Migrate data from the comment field to field storage.
contact_install in modules/contact/contact.install
Implements hook_install().
devel_generate_add_statistics in sites/all/modules/devel/devel_generate.inc
Generate statistics information for a node.
devel_install in sites/all/modules/devel/devel.install
Implements hook_install()
drupal_install_system in includes/install.inc
Callback to install the system module.
drupal_write_record in includes/common.inc
Saves a record to the database based upon the schema.
field_sql_storage_field_storage_write in modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_write().
filter_update_7001 in modules/filter/filter.install
Break out "escape HTML filter" option to its own filter.
flood_register_event in includes/common.inc
Register an event for the current visitor to the flood control mechanism.
forum_field_storage_pre_insert in modules/forum/forum.module
Implements hook_field_storage_pre_insert().
forum_field_storage_pre_update in modules/forum/forum.module
Implements hook_field_storage_pre_update().
forum_node_insert in modules/forum/forum.module
Implements hook_node_insert().
forum_node_update in modules/forum/forum.module
Implements hook_node_update().
hook_field_storage_pre_insert in modules/field/field.api.php
Act before the storage backends insert field data.
hook_field_storage_pre_update in modules/field/field.api.php
Act before the storage backends update field data.
hook_insert in modules/node/node.api.php
Respond to creation of a new node.
hook_install in modules/system/system.api.php
Perform setup tasks when the module is installed.
hook_node_insert in modules/node/node.api.php
Respond to creation of a new node.
hook_taxonomy_term_insert in modules/taxonomy/taxonomy.api.php
Act on taxonomy terms when inserted.
hook_taxonomy_term_update in modules/taxonomy/taxonomy.api.php
Act on taxonomy terms when updated.
hook_user_insert in modules/user/user.api.php
A user account was created.
hook_user_logout in modules/user/user.api.php
The user just logged out.
hook_user_role_insert in modules/user/user.api.php
Inform other modules that a user role has been added.
hook_user_update in modules/user/user.api.php
A user account was updated.
locale in modules/locale/locale.module
Provides interface translation services.
locale_add_language in includes/locale.inc
API function to add a language.
locale_install in modules/locale/locale.install
Implements hook_install().
locale_translate_edit_form_submit in modules/locale/locale.admin.inc
Process string editing form submissions.
lock_acquire in includes/lock.inc
Acquire (or renew) a lock, but do not block if it fails.
mediamosa_profile_install in profiles/mediamosa_profile/mediamosa_profile.install
Implement hook_install().
menu_link_save in includes/menu.inc
Save a menu link.
minimal_install in profiles/minimal/minimal.install
Implements hook_install().
node_access_rebuild in modules/node/node.module
Rebuild the node access database. This is occasionally needed by modules that make system-wide changes to access levels.
node_access_write_grants in modules/node/node.module
Writes a list of grants to the database, deleting any previously saved ones.
node_block_admin_configure_submit in modules/node/node.module
Form submit handler for block configuration form.
node_install in modules/node/node.install
Implements hook_install().
node_type_save in modules/node/node.module
Saves a node type to the database.
openid_association in modules/openid/openid.module
Attempt to create a shared secret with the OpenID Provider.
openid_user_identities in modules/openid/openid.pages.inc
Menu callback; Manage OpenID identities for the specified user.
performance_log_details in sites/all/modules/devel/performance/performance.module
performance_log_summary_db in sites/all/modules/devel/performance/performance.module
poll_insert in modules/poll/poll.module
Implements hook_insert().
poll_vote in modules/poll/poll.module
Submit handler for processing a vote.
profile_field_form_submit in modules/profile/profile.admin.inc
Process profile_field_form submissions.
search_index in modules/search/search.module
Update the full-text search index for a particular item.
simpletest_run_tests in modules/simpletest/simpletest.module
Actually runs tests.
standard_install in profiles/standard/standard.install
Implements hook_install().
statistics_exit in modules/statistics/statistics.module
Implements hook_exit().
system_block_ip_action in modules/system/system.module
Blocks the current user's IP address.
system_ip_blocking_form_submit in modules/system/system.admin.inc
system_update_7003 in modules/system/system.install
Update {blocked_ips} with valid IP addresses from {access}.
system_update_7007 in modules/system/system.install
Convert to new method of storing permissions.
system_update_7011 in modules/system/system.install
Split the 'bypass node access' permission from 'administer nodes'.
system_update_7029 in modules/system/system.install
Add new 'view own unpublished content' permission for authenticated users. Preserves legacy behavior from Drupal 6.x.
system_update_7035 in modules/system/system.install
Migrate upload module files to the new {file} table.
system_update_7036 in modules/system/system.install
Split the 'access site in maintenance mode' permission from 'administer site configuration'.
system_update_files_database in modules/system/system.module
Updates the records in the system table based on the files array.
taxonomy_field_insert in modules/taxonomy/taxonomy.module
Implements hook_field_insert().
taxonomy_field_update in modules/taxonomy/taxonomy.module
Implements hook_field_update().
taxonomy_term_save in modules/taxonomy/taxonomy.module
Save a term object to the database.
taxonomy_test_taxonomy_term_insert in modules/simpletest/tests/taxonomy_test.module
Implements hook_taxonomy_term_insert().
taxonomy_update_7005 in modules/taxonomy/taxonomy.install
Migrate {taxonomy_term_node} table to field storage.
tracker_cron in modules/tracker/tracker.module
Implements hook_cron().
trigger_assign_form_submit in modules/trigger/trigger.admin.inc
Submit function for trigger_assign_form().
update_fix_d7_install_profile in includes/update.inc
Register the currently installed profile in the system table.
update_fix_d7_requirements in includes/update.inc
Perform Drupal 6.x to 7.x updates that are required for update.php to function properly.
user_install in modules/user/user.install
Implements hook_install().
user_save in modules/user/user.module
Save changes to a user account or add a new user.
_book_update_outline in modules/book/book.module
Common helper function to handles additions and updates to the book outline.
_field_sql_storage_etid in modules/field/modules/field_sql_storage/field_sql_storage.module
Retrieve or assign an entity type id for an entity type.
_locale_import_one_string_db in includes/locale.inc
Import one string into the database.
_locale_parse_js_file in includes/locale.inc
Parses a JavaScript file, extracts strings wrapped in Drupal.t() and Drupal.formatPlural() and inserts them into the database.
_mediamosa_asset_metadata_property_group_install in sites/all/modules/mediamosa/core/asset/metadata/property/group/mediamosa_asset_metadata_property_group.install.inc
Implements hook_install().
_mediamosa_asset_metadata_property_install in sites/all/modules/mediamosa/core/asset/metadata/property/mediamosa_asset_metadata_property.install.inc
Implements hook_install().
_mediamosa_transcode_mapping_install in sites/all/modules/mediamosa/core/transcode/mapping/mediamosa_transcode_mapping.install.inc
Implements hook_install().
_mediamosa_webservice_install in sites/all/modules/mediamosa/core/webservice/mediamosa_webservice.install.inc
Implements hook_install().
_menu_router_save in includes/menu.inc
Helper function to save data from menu_router_build() to the router table.
_process_server_node in sites/all/modules/mediamosa/core/node/mediamosa_node_mediamosa_server.inc
Save the extra tools and containers.
_registry_parse_file in includes/registry.inc
Parse a file and save its function and class listings.
_update_create_fetch_task in modules/update/update.fetch.inc
Add a task to the queue for fetching release history data for a project.

Code

includes/database/database.inc, line 2225

<?php
function db_insert($table, array $options = array()) {
  if (empty($options['target']) || $options['target'] == 'slave') {
    $options['target'] = 'default';
  }
  return Database::getConnection($options['target'])->insert($table, $options);
}
?>