db_insert
- Versions
- 7
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
A new InsertQuery object for this connection.
Related topics
- Database abstraction layer
- Allow the use of different database servers using the same code base.
▾ 79 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
- comment_enable in modules/comment/comment.install
- Implement hook_enable().
- comment_node_insert in modules/comment/comment.module
- Implement hook_node_insert().
- comment_save in modules/comment/comment.module
- Accepts a submission of new or changed comment content.
- contact_install in modules/contact/contact.install
- Implement hook_install().
- default_install in profiles/default/default.install
- Implement hook_install().
- drupal_install_system in includes/install.inc
- Callback to install the system module.
- drupal_write_record in includes/common.inc
- Save a record to the database based upon the schema.
- expert_install in profiles/expert/expert.install
- Implement hook_install().
- field_sql_storage_field_storage_write in modules/field/modules/field_sql_storage/field_sql_storage.module
- Implement 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_attach_pre_insert in modules/forum/forum.module
- Implement hook_field_attach_pre_insert().
- forum_field_attach_pre_update in modules/forum/forum.module
- Implement hook_field_attach_pre_update().
- forum_node_insert in modules/forum/forum.module
- Implement hook_node_insert().
- forum_node_update in modules/forum/forum.module
- Implement hook_node_update().
- hook_insert in modules/node/node.api.php
- Respond to node insertion.
- 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 node insertion.
- 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
- Implement hook_install().
- locale_translate_edit_form_submit in includes/locale.inc
- Process string editing form submissions.
- lock_acquire in includes/lock.inc
- Acquire (or renew) a lock, but do not block if it fails.
- menu_link_save in includes/menu.inc
- Save a menu link.
- node_access_example_node_insert in developer/examples/node_access_example.module
- Implementation of hook_node_insert().
- 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
- This function will write a list of grants to the database, deleting any pre-existing grants. If a realm is provided, it will only delete grants from that realm, but it will always delete a grant from the 'all' realm. Modules which utilize...
- node_type_save in modules/node/node.module
- Saves a node type to the database.
- php_install in modules/php/php.install
- Implement hook_install().
- poll_insert in modules/poll/poll.module
- Implement 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.
- statistics_exit in modules/statistics/statistics.module
- Implement hook_exit().
- system_block_ip_action in modules/system/system.module
- Implement a Drupal action. Blocks the user's IP address.
- system_install in modules/system/system.install
- Implement hook_install().
- 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_7021 in modules/system/system.install
- Add new blocks to new regions, migrate custom variables to blocks.
- 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_7044 in modules/system/system.install
- Reuse the actions_aid table as sequences.
- 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
- Implement hook_field_insert().
- taxonomy_field_update in modules/taxonomy/taxonomy.module
- Implement 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
- Implement 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
- Implement 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.
- upload_save in modules/upload/upload.module
- user_modules_installed in modules/user/user.module
- Implementation of hook_modules_installed().
- 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 object 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.
- _menu_router_save in includes/menu.inc
- Helper function to save data from menu_router_build() to the router table.
- _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 1940
<?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);
}
?>Login or register to post comments 