mysql - Magento 1.8.0在处理您的请求时出错

标签 mysql magento

我有两个完全相同的站点,一个在本地计算机上,另一个在现场。当我尝试将最好的产品放入右侧栏中时,本地计算机上的产品运行正常,但是实际站点抛出以下错误

a:5:{i:0; s:2382:“ SELECT SUM(order_items.qty_ordered)AS`ordered_qty`,`order_items`.`name` AS`order_items_name`,`order_items`.`product_id` AS`entity_id`, `e`.`entity_type_id`,`e`.`attribute_set_id`,`e`.`type_id`,`e`.`sku`,`e`.`has_options`,`e``required_options`,`e ..created_at`,`e`.updated_at`,`e`.entity_id`,`e`.`attribute_set_id`,`e`.`type_id`,`e`.`成本`,`e`。 `created_at`,`e`.enable_googlecheckout`,`e`.gift_message_available`,`e`.has_options`,`e`.`image_label`,`e`.is_imported`,`e`.is_recurring `,`e`.`links_exist`,`e`.`links_purchased_separately`,`e`.links_title`,`e`.`name`,`e`.`news_from_date`,`e`。 `e`.`price`,`e`。`price_type`,`e`。price_view`,`e`。`recurring_profile`,`e``required_options`,`e`.shipment_type`,`e `.`short_description`,`e`.`sku`,`e`.`sku_type`,`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`.`可见性`,`e`.`weight`,`e`.`weight_type`,`e msrp_display_actual_price_type`s \ msrp_display_actual_price_type`e \ msrp_enabled`price_index`price`price_index`tax_class_id`price_index`final_price`IF(price_index。 tier_price不为空,至少(price_index.min_price,price_index.tier_price),price_index.min_price)为`minimal_price`,`price_index`.`min_price`,`price_index`.`max_price`,`price_index`.`tier_price`,` e`.name`,`e`.`price`,`e`.`small_image`,`cat_index`.position` AS``cat_index_position` from`sales_flat_order_item`AS``order_items`
 INNER JOIN`sales_flat_order` AS`order` ON`order`.entity_id = order_items.order_id和`order`.state'canceled'
 左联接`catalog_product_entity` AS`e` ON(e.type_id NOT IN('grouped','configurable','bundle'))AND e.entity_id = order_items.product_id AND e.entity_type_id = 4
 INNER JOIN`catalog_product_index_price` AS`price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id ='1'AND price_index.customer_group_id = 0
 内联接`catalog_category_product_index` AS`cat_index` ON cat_index.product_id = e.entity_id AND cat_index.store_id ='1'AND cat_index.visibility IN(2,4)AND cat_index.category_id ='2'其中(parent_item_id为NULL)组BY`order_items`.`product_id`拥有(SUM(order_items.qty_ordered)> 0)ORDER BY`ordered_qty` desc LIMIT 9

“; i:1; s:5232:”#0 /var/www/vhosts/.../httpdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo-> _ execute(Array)

#1 /var/www/vhosts/.../httpdocs/app/code/core/Zend/Db/Statement.php(291):Varien_Db_Statement_Pdo_Mysql-> _ execute(Array)

#2 /var/www/vhosts/.../httpdocs/lib/Zend/Db/Adapter/Abstract.php(479):Zend_Db_Statement-> execute(Array)

#3 /var/www/vhosts/.../httpdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238):Zend_Db_Adapter_Abstract-> query('SELECT SUM(orde ...',Array))

#4 /var/www/vhosts/.../httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(428):Zend_Db_Adapter_Pdo_Abstract-> query('SELECT SUM(orde ...',Array)

#5 /var/www/vhosts/.../httpdocs/lib/Zend/Db/Adapter/Abstract.php(734):Varien_Db_Adapter_Pdo_Mysql-> query('SELECT SUM(orde ...',Array)

#6 /var/www/vhosts/.../httpdocs/lib/Varien/Data/Collection/Db.php(734):Zend_Db_Adapter_Abstract-> fetchAll('SELECT SUM(orde ...',Array)

#7 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1047):Varien_Data_Collection_Db-> _ fetchAll('SELECT SUM(orde .. 。')

#8 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871):Mage_Eav_Model_Entity_Collection_Abstract-> _ loadEntities(false,false)

#9 /var/www/vhosts/.../httpdocs/lib/Varien/Data/Collection.php(752):Mage_Eav_Model_Entity_Collection_Abstract-> load()

#10 / var / www / vhosts /.../ httpdocs / app / design / frontend / default / ma_pharmacy / template / magentothem / bestsellerproductvertscroller / bestsellerright.phtml(42):Varien_Data_Collection-> count()

#11 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(241):include('/ var / www / vhosts ...')

#12 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(272):Mage_Core_Block_Template-> fetchView('frontend / defaul ...')

#13 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(286):Mage_Core_Block_Template-> renderView()

#14 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(886):Mage_Core_Block_Template-> _ toHtml()

#15 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Text/List.php(43):Mage_Core_Block_Abstract-> toHtml()

#16 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(886):Mage_Core_Block_Text_List-> _ toHtml()

#17 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(605):Mage_Core_Block_Abstract-> toHtml()

#18 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(549):Mage_Core_Block_Abstract-> _ getChildHtml('right',true)

#19 /var/www/vhosts/.../httpdocs/app/design/frontend/default/ma_pharmacy/template/page/2columns-right.phtml(59):Mage_Core_Block_Abstract-> getChildHtml('right')

#20 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(241):include('/ var / www / vhosts ...')

#21 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(272):Mage_Core_Block_Template-> fetchView('frontend / defaul ...')

#22 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(286):Mage_Core_Block_Template-> renderView()

#23 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(886):Mage_Core_Block_Template-> _ toHtml()

#24 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Model/Layout.php(555):Mage_Core_Block_Abstract-> toHtml()

#25 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(390):Mage_Core_Model_Layout-> getOutput()

#26 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Cms/Helper/Page.php(137):Mage_Core_Controller_Varien_Action-> renderLayout()

#27 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Cms/Helper/Page.php(52):Mage_Cms_Helper_Page-> _ renderPage(Object(Mage_Cms_IndexController),'home')

#28 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Cms/controllers/IndexController.php(45):Mage_Cms_Helper_Page-> renderPage(Object(Mage_Cms_IndexController),'home')

#29 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(418):Mage_Cms_IndexController-> indexAction()

#30 / var / www / vhosts /.../ httpdocs / app / code / core / Mage / Core / Controller / Varien / Router / Standard.php(250):Mage_Core_Controller_Varien_Action-> dispatch('index')

#31 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172):Mage_Core_Controller_Varien_Router_Standard-> match(Object(Mage_Core_Controller_Request_Http))

#32 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Model/App.php(354):Mage_Core_Controller_Varien_Front-> dispatch()

#33 /var/www/vhosts/.../httpdocs/app/Mage.php(683):Mage_Core_Model_App-> run(Array)

#34 /var/www/vhosts/.../httpdocs/index.php(87):Mage :: run('','store')

#35 {main}“; s:3:” url“; s:1:” /“; s:11:” script_name“; s:10:” / index.php“; s:4:”皮肤“; s:7:“默认”;}

我不太明白问题出在哪里。希望获得帮助,我应该到哪里去看看。

非常感谢。

最佳答案

使用此步骤

system->config->catalog->frontend

Use Flat Catalog CategoryUse Flat Catalog Product都设置为no。

这个对我有用。

关于mysql - Magento 1.8.0在处理您的请求时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24502053/

相关文章:

php - 使用 json_encode 数据而不是创建新表是不是糟糕的设计?

php - 当数据库为空时禁止更新数据

magento - 在 EE 1.13 中,从管理员清除缓存实际上并没有清除缓存

node.js - NodejS-Magento Rest API

使用 Varnish 时 Magento Onepagechekout 登录问题

javascript - 动态更新表行

php - 需要 Mysql 选择查询的帮助

mysql - 在 sql 中创建存储过程时,我不断收到 "unexpected character"和 "unrecognized data type"错误

mysql - HikariCP 连接池在 spring-batch 4.0 中挂起

php - Magento install 在可用时提示缺少 InnoDB