public function DatabaseSchema_sqlite::fieldExists
Check if a column exists in the given table.
Parameters
$table: The name of the table in drupal (no prefixing).
$name: The name of the column.
Return value
TRUE if the given column exists, otherwise FALSE.
Overrides DatabaseSchema::fieldExists
10 calls to DatabaseSchema_sqlite::fieldExists()
- DatabaseSchema_sqlite::addField in drupal-7.x/
includes/ database/ sqlite/ schema.inc - Add a new field to a table.
- DatabaseSchema_sqlite::addField in drupal-7.x/
includes/ database/ sqlite/ schema.inc - Add a new field to a table.
- DatabaseSchema_sqlite::changeField in drupal-7.x/
includes/ database/ sqlite/ schema.inc - Change a field definition.
- DatabaseSchema_sqlite::changeField in drupal-7.x/
includes/ database/ sqlite/ schema.inc - Change a field definition.
- DatabaseSchema_sqlite::dropField in drupal-7.x/
includes/ database/ sqlite/ schema.inc - Drop a field.
Archivo
- drupal-7.x/
includes/ database/ sqlite/ schema.inc, line 28 - Database schema code for SQLite databases.
Class
Código
public function fieldExists($table, $column) {
$schema = $this->introspectSchema($table);
return !empty($schema['fields'][$column]);
}