Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error after building a Product (SQLSTATE[42000]: Syntax error or access violation: 1064)
 
bathroomsavers
Jr. Member
 
Total Posts:  3
Joined:  2012-05-13
 

Getting very excited with launching my first test product. When I click category to view this test (simple) product I get the code below. All other categories (with no products) view fine.

When I set the ‘Is Anchor’ setting to ‘No’ I can see the product but no layered Navigation obviously. It returns the error below when set to yes.

I can search the product and view the product page.

I have installed 1.7.02 without sample data, then installed your theme before doing anything else.

Can you advise? Thanks in advance

Code below is the error page I receive:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(ROUND((price_index.min_price ) * 1, 2)) FROM `catalog_product_entity` AS `e`
I’ at line 1

Trace:
#0 /home/radiator/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/radiator/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/radiator/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/radiator/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’SELECT COUNT(DI...’, Array)
#4 /home/radiator/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query(’SELECT COUNT(DI...’, Array)
#5 /home/radiator/public_html/lib/Zend/Db/Adapter/Abstract.php(753): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/radiator/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php(912): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select), Array, 3)
#7 /home/radiator/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php(2098): Mage_Catalog_Model_Resource_Product_Collection->_prepareStatisticsData()
#8 /home/radiator/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php(139): Mage_Catalog_Model_Resource_Product_Collection->getMaxPrice()
#9 /home/radiator/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php(108): Mage_Catalog_Model_Layer_Filter_Price->getMaxPriceInt()
#10 /home/radiator/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php(314): Mage_Catalog_Model_Layer_Filter_Price->getPriceRange()
#11 /home/radiator/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(151): Mage_Catalog_Model_Layer_Filter_Price->_getItemsData()
#12 /home/radiator/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(120): Mage_Catalog_Model_Layer_Filter_Abstract->_initItems()
#13 /home/radiator/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(109): Mage_Catalog_Model_Layer_Filter_Abstract->getItems()
#14 /home/radiator/public_html/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(132): Mage_Catalog_Model_Layer_Filter_Abstract->getItemsCount()
#15 /home/radiator/public_html/app/code/core/Mage/Catalog/Block/Layer/View.php(218): Mage_Catalog_Block_Layer_Filter_Abstract->getItemsCount()
#16 /home/radiator/public_html/app/code/core/Mage/Catalog/Block/Layer/View.php(233): Mage_Catalog_Block_Layer_View->canShowOptions()
#17 /home/radiator/public_html/app/design/frontend/base/default/template/catalog/layer/view.phtml(34): Mage_Catalog_Block_Layer_View->canShowBlock()
#18 /home/radiator/public_html/app/code/core/Mage/Core/Block/Template.php(241): include(’/home/radiator/...’)
#19 /home/radiator/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(’frontend/base/d...’)
#20 /home/radiator/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#21 /home/radiator/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#22 /home/radiator/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#23 /home/radiator/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#24 /home/radiator/public_html/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#25 /home/radiator/public_html/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml(’left’, true)
#26 /home/radiator/public_html/app/design/frontend/default/celebrity/template/page/2columns-left.phtml(64): Mage_Core_Block_Abstract->getChildHtml(’left’)
#27 /home/radiator/public_html/app/code/core/Mage/Core/Block/Template.php(241): include(’/home/radiator/...’)
#28 /home/radiator/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(’frontend/defaul...’)
#29 /home/radiator/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#30 /home/radiator/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#31 /home/radiator/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#32 /home/radiator/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#33 /home/radiator/public_html/app/code/core/Mage/Catalog/controllers/CategoryController.php(159): Mage_Core_Controller_Varien_Action->renderLayout()
#34 /home/radiator/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Catalog_CategoryController->viewAction()
#35 /home/radiator/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(’view’)
#36 /home/radiator/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#37 /home/radiator/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#38 /home/radiator/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#39 /home/radiator/public_html/index.php(87): Mage::run(’’, ‘store’)
#40 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
bathroomsavers
Jr. Member
 
Total Posts:  3
Joined:  2012-05-13
 

Please help me someone.

Layered Navigation causing the above error and I have no idea why. Turn it off (set is anchor to no) and everything displays fine.

eh? So strange - please help

downer  downer  downer  downer  downer  downer  downer

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mesaya
Newbie
 
Total Posts:  0
Joined:  2013-03-02
 

Im having the same issue right now.

when i add a new product i get the error 42000 syntax bladiebla…

when i remove the product the page shows as normal.

I hope somebody can post a solution for this.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top