大家好,我可以帮助我解决以下错误,我正在进入magento
处理您的请求SQLSTATE [42S22]时出错: 未找到列:1054未知列 'SUM((IFNULL(main_table.base_total_invoiced,0) - IFNULL(main_table.base_tax_invoiced,0) - IFNULL(main_table.base_shipping_invoiced,0) - (IFNULL(main_table.base_total_refunded,0) - IFNULL(ma'in'字段 list',查询为:SELECT
SUM((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(main_table.base_tax_refunded, 0) - IFNULL(main_table.base_shipping_refunded, 0))) * main_table
。base_to_global_rate)
ASlifetime
,AVG((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(main_table.base_tax_refunded, 0) - IFNULL(main_table.base_shipping_refunded, 0))) * main_table
。base_to_global_rate)
ASaverage
FROMsales_flat_order
ASmain_table
WHERE(main_table.status NOT IN('取消'))AND(main_table.state NOT IN('new', 'pending_payment'))
跟踪:
# 0 /home/harrison/public_html/includes/src/Varien_Db_Statement_Pdo_Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/harrison/public_html/includes/src/__default.php(65540): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/harrison/public_html/includes/src/__default.php(54759): Zend_Db_Statement->execute(Array)
#3 /home/harrison/public_html/includes/src/__default.php(55796): Zend_Db_Adapter_Abstract->query('SELECT `SUM((IF...', Array)
#4 /home/harrison/public_html/includes/src/__default.php(56732): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `SUM((IF...', Array)
#5 /home/harrison/public_html/includes/src/__default.php(55016): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `SUM((IF...', Array)
#6 /home/harrison/public_html/includes/src/__default.php(32374): Zend_Db_Adapter_Abstract->fetchAll('SELECT `SUM((IF...', Array)
#7 /home/harrison/public_html/includes/src/__default.php(33000): Varien_Data_Collection_Db->_fetchAll('SELECT `SUM((IF...', Array)
#8 /home/harrison/public_html/includes/src/__default.php(32206): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#9 /home/harrison/public_html/includes/src/Mage_Adminhtml_Block_Dashboard_Sales.php(65): Varien_Data_Collection_Db->load()
#10 /home/harrison/public_html/includes/src/__default.php(1987): Mage_Adminhtml_Block_Dashboard_Sales->_prepareLayout()
#11 /home/harrison/public_html/includes/src/__default.php(28503): Mage_Core_Block_Abstract->setLayout(Object(Smartwave_All_Model_Core_Layout))
#12 /home/harrison/public_html/includes/src/Mage_Adminhtml_Block_Dashboard.php(54): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#13 /home/harrison/public_html/includes/src/__default.php(1987): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#14 /home/harrison/public_html/includes/src/__default.php(28503): Mage_Core_Block_Abstract->setLayout(Object(Smartwave_All_Model_Core_Layout))
#15 /home/harrison/public_html/includes/src/__default.php(28519): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#16 /home/harrison/public_html/includes/src/__default.php(28286): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#17 /home/harrison/public_html/includes/src/Smartwave_All_Model_Core_Layout.php(40): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#18 /home/harrison/public_html/includes/src/__default.php(28252): Smartwave_All_Model_Core_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#19 /home/harrison/public_html/includes/src/Smartwave_All_Model_Core_Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#20 /home/harrison/public_html/includes/src/__default.php(28257): Smartwave_All_Model_Core_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#21 /home/harrison/public_html/includes/src/Smartwave_All_Model_Core_Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#22 /home/harrison/public_html/includes/src/__default.php(14198): Smartwave_All_Model_Core_Layout->generateBlocks()
#23 /home/harrison/public_html/includes/src/__default.php(14123): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#24 /home/harrison/public_html/includes/src/Mage_Adminhtml_Controller_Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#25 /home/harrison/public_html/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#26 /home/harrison/public_html/includes/src/__default.php(14272): Mage_Adminhtml_DashboardController->indexAction()
#27 /home/harrison/public_html/includes/src/__default.php(18736): Mage_Core_Controller_Varien_Action->dispatch('index')
#28 /home/harrison/public_html/includes/src/__default.php(18266): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#29 /home/harrison/public_html/includes/src/__default.php(21117): Mage_Core_Controller_Varien_Front->dispatch()
#30 /home/harrison/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#31 /home/harrison/public_html/index.php(83): Mage::run('base', 'website')
#32 {main}
答案 0 :(得分:0)
尝试禁用编译或重新编译文件。
答案 1 :(得分:0)
错误是由于升级不完整。 我曾尝试升级到1.9.2.2,但意识到我的皮肤不支持它。所以重新上载1.9.2.1文件,一切似乎都有效。 但是在1.9.2.2升级期间,它会创建1.9.2.1文件没有关联的额外sql条目。
修复是完全升级到1.9.2.2