You are here

function db_lock_table in Drupal 4

Same name in this branch
  1. 4 includes/database.mysqli.inc \db_lock_table()
  2. 4 includes/database.mysql.inc \db_lock_table()
  3. 4 includes/database.pgsql.inc \db_lock_table()
Same name and namespace in other branches
  1. 5 includes/database.mysqli.inc \db_lock_table()
  2. 5 includes/database.mysql.inc \db_lock_table()
  3. 5 includes/database.pgsql.inc \db_lock_table()
  4. 6 includes/database.mysqli.inc \db_lock_table()
  5. 6 includes/database.mysql.inc \db_lock_table()
  6. 6 includes/database.pgsql.inc \db_lock_table()

Lock a table. This function automatically starts a transaction.

Related topics

3 calls to db_lock_table()
cache_set in includes/bootstrap.inc
Store data in the persistent cache.
variable_set in includes/bootstrap.inc
Set a persistent variable.
_block_rehash in modules/block.module
Update the 'blocks' DB table with the blocks currently exported by modules.

File

includes/database.pgsql.inc, line 342
Database interface code for PostgreSQL database servers.

Code

function db_lock_table($table) {
  db_query('BEGIN; LOCK TABLE {' . db_escape_table($table) . '} IN EXCLUSIVE MODE');
}