function db_lock_table in Drupal 6
Same name in this branch
- 6 includes/database.mysqli.inc \db_lock_table()
- 6 includes/database.mysql.inc \db_lock_table()
- 6 includes/database.pgsql.inc \db_lock_table()
Same name and namespace in other branches
- 4 includes/database.mysqli.inc \db_lock_table()
- 4 includes/database.mysql.inc \db_lock_table()
- 4 includes/database.pgsql.inc \db_lock_table()
- 5 includes/database.mysqli.inc \db_lock_table()
- 5 includes/database.mysql.inc \db_lock_table()
- 5 includes/database.pgsql.inc \db_lock_table()
Lock a table. This function automatically starts a transaction.
Related topics
File
- includes/
database.pgsql.inc, line 371 - 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');
}