登录magento购物车的管理部分后,我收到以下错误:
SQLSTATE [42000]:语法错误或访问冲突:1065查询 空
提前感谢您提出任何建议或解决方案,在解决此问题之前,我无法在购物车的后端工作。
这是mysql常规日志输出:
46 Query SET SQL_MODE=''
46 Query SET NAMES utf8
46 Query SHOW TABLE STATUS LIKE 'core_resource'
46 Query SELECT `core_resource`.* FROM `core_resource`
46 Query SELECT `index_process`.`indexer_code` FROM `index_process`
46 Query SELECT `core_website`.`website_id`, `core_website`.`code`, `core_website`.`name` FROM `core_website`
46 Query SELECT `core_store`.`store_id`, `core_store`.`code`, `core_store`.`name`, `core_store`.`website_id` FROM `core_store` ORDER BY `sort_order` ASC
46 Query SELECT `core_config_data`.`scope`, `core_config_data`.`scope_id`, `core_config_data`.`path`, `core_config_data`.`value` FROM `core_config_data`
46 Query SELECT `main_table`.* FROM `core_store` AS `main_table` ORDER BY CASE WHEN main_table.store_id = 0 THEN 0 ELSE 1 END ASC, main_table.sort_order ASC, main_table.name ASC
46 Query SELECT `main_table`.* FROM `core_website` AS `main_table` ORDER BY main_table.sort_order ASC, main_table.name ASC
46 Query SELECT `main_table`.* FROM `core_store_group` AS `main_table` ORDER BY main_table.name ASC
46 Query SELECT `core_url_rewrite`.* FROM `core_url_rewrite` WHERE (request_path IN ('admin', 'admin/')) AND (store_id IN(0, 1))
111207 21:03:07
46 Query SELECT `core_translate`.`string`, `core_translate`.`translate` FROM `core_translate` WHERE (store_id IN (0 , '0')) AND (locale = 'en_US') ORDER BY `store_id` ASC
46 Query SELECT `admin_user`.* FROM `admin_user` WHERE (`admin_user`.`user_id`='1')
46 Query
46 Quit
这是PHP错误日志输出:
SQLSTATE [42000]:语法错误或访问冲突:1065查询 空
Trace:
#0 /home/gyroadmin/www/gyrohobbies.com/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/gyroadmin/www/gyrohobbies.com/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/gyroadmin/www/gyrohobbies.com/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/gyroadmin/www/gyrohobbies.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('', Array)
#4 /home/gyroadmin/www/gyrohobbies.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('', Array)
#5 /home/gyroadmin/www/gyrohobbies.com/lib/Zend/Db/Adapter/Abstract.php(753): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php(109): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
#7 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/AdminNotification/Model/Inbox.php(118): Mage_AdminNotification_Model_Resource_Inbox->parse(Object(Mage_AdminNotification_Model_Inbox), Array)
#8 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/AdminNotification/Model/Feed.php(97): Mage_AdminNotification_Model_Inbox->parse(Array)
#9 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/AdminNotification/Model/Observer.php(50): Mage_AdminNotification_Model_Feed->checkUpdate()
#10 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/Core/Model/App.php(1299): Mage_AdminNotification_Model_Observer->preDispatch(Object(Varien_Event_Observer))
#11 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/Core/Model/App.php(1280): Mage_Core_Model_App->_callObserverMethod(Object(Mage_AdminNotification_Model_Observer), 'preDispatch', Object(Varien_Event_Observer))
#12 /home/gyroadmin/www/gyrohobbies.com/app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#13 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/Core/Controller/Varien/Action.php(505): Mage::dispatchEvent('controller_acti...', Array)
#14 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/Adminhtml/Controller/Action.php(152): Mage_Core_Controller_Varien_Action->preDispatch()
#15 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/Core/Controller/Varien/Action.php(409): Mage_Adminhtml_Controller_Action->preDispatch()
#16 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#17 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /home/gyroadmin/www/gyrohobbies.com/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
#19 /home/gyroadmin/www/gyrohobbies.com/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#20 /home/gyroadmin/www/gyrohobbies.com/index.php(83): Mage::run('', 'store')
#21 {main}
答案 0 :(得分:0)
乍一看,这看起来像是Mage_AdminNotification
模块的资源定义/表格有问题。
您的系统似乎成功创建了一个正确的Varien_Db_Select
实例,但无法从adminnotification_inbox
表中读取特定记录。
假设这是唯一发生的错误:在$feedModel->checkUpdate();
中注释掉Mage_AdminNotification_Model_Observer
来电,至少可以让您再次访问管理员后端。