0
votes

Whenever I try to update or delete anything on my Drupal website, I am confronted with this error. Even when I try to clear the cache of the website an error message pops up.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal_7_38.cache_field' doesn't exist: DELETE FROM {cache_field} WHERE (cid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => field:node:10 ) in cache_clear_all() (line 167 of C:\Users\Hasan\Sites\devdesktop\drupal-7.38\includes\cache.inc).

I have tried updating drupal using update.php however this error pops up in the middle of it executing.

1

1 Answers

0
votes

Solved the problem. I deleted the cache_field table using the drop command and then used the command below to create the table again.

CREATE TABLE IF NOT EXISTS `cache_field` (
`cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
`data` longblob COMMENT 'A collection of data to cache.',
`expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
`created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.',
`serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
PRIMARY KEY (`cid`),
KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Generic cache table for caching things not separated out...'

Hope this helps!