2015-07-13 64 views
0

每當我嘗試更新或刪除Drupal網站上的任何內容時,我都會遇到此錯誤。即使我嘗試清除網站的緩存,也會彈出錯誤消息。PDOException:SQLSTATE [42S02] 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

解決了這個問題。我使用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...' 

希望這有助於!

相關問題