db_column_exists

Versions
6 – 7
db_column_exists($table, $column)

Check if a column exists in the given table.

Related topics

▾ 3 functions call db_column_exists()

system_update_6051 in modules/system/system.install
Create a signature_format column.
user_update_7002 in modules/user/user.install
Convert user time zones from time zone offsets to time zone names.
user_update_7004 in modules/user/user.install
Add the user's pictures to the {file} table and make them managed files.

Code

includes/database/database.inc, line 2328

<?php
function db_column_exists($table, $column) {
  return Database::getConnection()->schema()->columnExists($table, $column);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.