每当我尝试更新或删除Drupal网站上的任何内容时,我都会遇到此错误。即使我尝试清除网站的缓存,也会弹出一条错误消息。
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).
我尝试使用update.php更新drupal但是在执行过程中会弹出此错误。
答案 0 :(得分:0)
解决了这个问题。我使用drop命令删除了cache_field表,然后使用下面的命令再次创建表。
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...'
希望这有帮助!