function db_drop_field
7.x database.inc | db_drop_field($table, $field) |
6.x database.pgsql.inc | db_drop_field(&$ret, $table, $field) |
6.x database.mysql-common.inc | db_drop_field(&$ret, $table, $field) |
Drop a field.
Parameters
$ret: Array to which query results will be added.
$table: The table to be altered.
$field: The field to be dropped.
Related topics
4 calls to db_drop_field()
- db_change_field in drupal-6.x/
includes/ database.pgsql.inc - Change a field definition.
- locale_update_6001 in drupal-6.x/
modules/ locale/ locale.install - Change locale column to language. The language column is added by update_fix_d6_requirements() in update.php to avoid a large number of error messages from update.php. All we need to do here is copy locale to language and then drop locale.
- system_update_6008 in drupal-6.x/
modules/ system/ system.install - Add info files to themes. The info and owner columns are added by update_fix_d6_requirements() in update.php to avoid a large number of error messages from update.php. All we need to do here is copy description to owner and then drop description.
- system_update_6036 in drupal-6.x/
modules/ system/ system.install - Change the search schema and indexing.
File
- drupal-6.x/
includes/ database.mysql-common.inc, line 330 - Functions shared between mysql and mysqli database engines.
Code
function db_drop_field(&$ret, $table, $field) {
$ret[] = update_sql('ALTER TABLE {' . $table . '} DROP ' . $field);
}