【问题标题】:PDOException: SQLSTATE[42S02] Drupal ErrorPDOException: SQLSTATE[42S02] Drupal 错误
【发布时间】:2015-07-13 11:47:05
【问题描述】:

每当我尝试更新或删除我的 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,但是在执行过程中会弹出此错误。

【问题讨论】:

    标签: php drupal drupal-7


    【解决方案1】:

    解决了这个问题。我使用 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...'
    

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-02-02
      • 2019-04-24
      • 2017-06-12
      • 2014-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多