mysql - Magento 商店 - SQL 错误

标签 mysql sql magento mysql-error-1054

当我打开平面目录时,我在我的 Magento 商店中收到此错误:

SELECT COUNT(_table_views.event_id) AS `views`, `e`.*, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`category_ids`, `e`.`created_at`, `e`.`enable_googlecheckout`, `e`.`has_options`, `e`.`image_label`, `e`.`links_purchased_separately`, `e`.`links_title`, `e`.`name`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`price`, `e`.`price_type`, `e`.`price_view`, `e`.`required_options`, `e`.`shipment_type`, `e`.`short_description`, `e`.`sku`, `e`.`small_image`, `e`.`small_image_label`, `e`.`special_from_date`, `e`.`special_price`, `e`.`special_to_date`, `e`.`tax_class_id`, `e`.`thumbnail`, `e`.`thumbnail_label`, `e`.`updated_at`, `e`.`url_key`, `e`.`url_path`, `e`.`weight`, `e`.`weight_type`, `e`.`display_price_group_0`, `e`.`display_price_group_1`, `e`.`display_price_group_2`, `e`.`display_price_group_3`, `e`.`display_price_group_4`, `cat_index`.`position` AS `cat_index_position` FROM `report_event` AS `_table_views`
 INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = _table_views.object_id AND e.entity_type_id = 10
 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.category_id='10' WHERE (_table_views.event_type_id = '1') AND (logged_at >= '2010-01-06 17:03:57') AND (logged_at <= '2010-01-13 17:03:57') GROUP BY `e`.`entity_id` HAVING (views > 0) ORDER BY `views` desc LIMIT 10

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.enable_googlecheckout' in 'field list'

有谁知道我将如何解决这个问题?

最佳答案

使用以下方法描述表 catalog_product_entity

describe catalog_product_entity;

并查看 enable_googlecheckout 是否作为列出现在表中。如果不存在,您可以尝试将其从查询中取出:

SELECT COUNT(_table_views.event_id) AS `views`, `e`.*, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`category_ids`, `e`.`created_at`, `e`.`has_options`, `e`.`image_label`, `e`.`links_purchased_separately`, `e`.`links_title`, `e`.`name`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`price`, `e`.`price_type`, `e`.`price_view`, `e`.`required_options`, `e`.`shipment_type`, `e`.`short_description`, `e`.`sku`, `e`.`small_image`, `e`.`small_image_label`, `e`.`special_from_date`, `e`.`special_price`, `e`.`special_to_date`, `e`.`tax_class_id`, `e`.`thumbnail`, `e`.`thumbnail_label`, `e`.`updated_at`, `e`.`url_key`, `e`.`url_path`, `e`.`weight`, `e`.`weight_type`, `e`.`display_price_group_0`, `e`.`display_price_group_1`, `e`.`display_price_group_2`, `e`.`display_price_group_3`, `e`.`display_price_group_4`, `cat_index`.`position` AS `cat_index_position` FROM `report_event` AS `_table_views`
 INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = _table_views.object_id AND e.entity_type_id = 10
 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.category_id='10' WHERE (_table_views.event_type_id = '1') AND (logged_at >= '2010-01-06 17:03:57') AND (logged_at <= '2010-01-13 17:03:57') GROUP BY `e`.`entity_id` HAVING (views > 0) ORDER BY `views` desc LIMIT 10

关于mysql - Magento 商店 - SQL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2058688/

相关文章:

PHP - 如果任何行结果匹配,如何更改 While 循环的结果

c# - mysql % 由于数据库文件路径中存在空格

mysql - 仅当替换值不为空时如何替换到列中?

sql - 来自数据库/sql json 列的 json.RawMessage 被覆盖

php - 没有这样的文件或目录 - Magento 错误

python - 使用python 2.7将csv文件加载到mysql中

php - PHP中的触发错误函数是什么?

php - 检查'pdo-> query foreach'是否返回null

magento - getGalleryImages 在 Magento 主页中返回 NULL

magento - 如何获取Magento中的cms页面列表?