Hello,

i accidently deleted a table in my database and since then i can't access my views anymore.
Whenenver i click on my links this error message appears:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'eiji.field_data_field_migrate_example_gender' doesn't exist: SELECT t.* FROM {field_data_field_migrate_example_gender} t WHERE (entity_type = :db_condition_placeholder_0) AND (entity_id IN (:db_condition_placeholder_1)) AND (language IN (:db_condition_placeholder_2)) AND (deleted = :db_condition_placeholder_3) ORDER BY delta ASC; Array ( [:db_condition_placeholder_0] => user [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => und [:db_condition_placeholder_3] => 0 ) in field_sql_storage_field_storage_load() (line 349 of /var/www/eiji/drupal-7.26/modules/field/modules/field_sql_storage/field_sql_storage.module).

I tried to fix it via update.php but had no luck.

Any help would be appreciated, since i hope i can fix it without deleting all the content and reinstalling drupal -.-

Comments

Jaypan’s picture

The easiest way to do it would be to create a new drupal installation, re-create the field, export that table from the new database and import it into your current database.

And stop doing directly accessing/touching the database. You should never be doing that unless you absolutely know what you are doing, and it would appear you don't. It's a huge no-no in Drupal.