[英]PDOException: SQLSTATE[42S02] Drupal Error
每当我尝试更新或删除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,但此错误在执行过程中弹出。
解决了问题。 我使用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...'
希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.