SELECT `e`.*, IF(at_is_active.value_id > 0, at_is_active.value, at_is_active_default.value) AS `is_active` FROM `catalog_category_entity` AS `e` INNER JOIN `catalog_category_entity_int` AS `at_is_active_default` ON (`at_is_active_default`.`entity_id` = `e`.`entity_id`) AND (`at_is_active_default`.`attribute_id` = '32') AND `at_is_active_default`.`store_id` = 0 LEFT JOIN `catalog_category_entity_int` AS `at_is_active` ON (`at_is_active`.`entity_id` = `e`.`entity_id`) AND (`at_is_active`.`attribute_id` = '32') AND (`at_is_active`.`store_id` = 4) WHERE (`e`.`entity_type_id` = '3') AND (()) AND (IF(at_is_active.value_id > 0, at_is_active.value, at_is_active_default.value) = '1') SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) AND (IF(at_is_active.value_id > 0, at_is_active.value, at_is_active_defaul...' at line 3, query was: SELECT `e`.*, IF(at_is_active.value_id > 0, at_is_active.value, at_is_active_default.value) AS `is_active` FROM `catalog_category_entity` AS `e` INNER JOIN `catalog_category_entity_int` AS `at_is_active_default` ON (`at_is_active_default`.`entity_id` = `e`.`entity_id`) AND (`at_is_active_default`.`attribute_id` = '32') AND `at_is_active_default`.`store_id` = 0 LEFT JOIN `catalog_category_entity_int` AS `at_is_active` ON (`at_is_active`.`entity_id` = `e`.`entity_id`) AND (`at_is_active`.`attribute_id` = '32') AND (`at_is_active`.`store_id` = 4) WHERE (`e`.`entity_type_id` = '3') AND (()) AND (IF(at_is_active.value_id > 0, at_is_active.value, at_is_active_default.value) = '1') #0 /usr/www/users/comaxc/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) #1 /usr/www/users/comaxc/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array) #2 /usr/www/users/comaxc/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #3 /usr/www/users/comaxc/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `e`.*, I...', Array) #4 /usr/www/users/comaxc/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `e`.*, I...', Array) #5 /usr/www/users/comaxc/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `e`.*, I...', Array) #6 /usr/www/users/comaxc/lib/Varien/Data/Collection/Db.php(740): Zend_Db_Adapter_Abstract->fetchAll('SELECT `e`.*, I...', Array) #7 /usr/www/users/comaxc/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1045): Varien_Data_Collection_Db->_fetchAll('SELECT `e`.*, I...') #8 /usr/www/users/comaxc/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false) #9 /usr/www/users/comaxc/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php(225): Mage_Eav_Model_Entity_Collection_Abstract->load(false, false) #10 /usr/www/users/comaxc/lib/Varien/Data/Collection.php(268): Mage_Catalog_Model_Resource_Category_Collection->load() #11 /usr/www/users/comaxc/app/code/local/Biwac/CurrentCategory/Block/Catalog/Product/Parents.php(50): Varien_Data_Collection->getFirstItem() #12 /usr/www/users/comaxc/app/code/local/Biwac/CurrentCategory/Block/Catalog/Product/Parents.php(21): Biwac_CurrentCategory_Block_Catalog_Product_Parents->getOneCategoryByProduct(Object(MageWorx_Downloads_Model_Catalog_Product)) #13 /usr/www/users/comaxc/app/code/local/Biwac/CurrentCategory/Block/Catalog/Product/Parents.php(70): Biwac_CurrentCategory_Block_Catalog_Product_Parents->getCurrentCategory() #14 /usr/www/users/comaxc/app/design/frontend/default/comax_shop/template/biwac/currentcategory/parent_category_products.phtml(10): Biwac_CurrentCategory_Block_Catalog_Product_Parents->getProductCollection() #15 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Template.php(241): include('/usr/www/users/...') #16 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...') #17 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() #18 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Template->_toHtml() #19 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml() #20 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Text_List->_toHtml() #21 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Abstract.php(641): Mage_Core_Block_Abstract->toHtml() #22 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Abstract.php(585): Mage_Core_Block_Abstract->_getChildHtml('content', true) #23 /usr/www/users/comaxc/app/design/frontend/default/comax_shop/template/page/2columns-left.phtml(39): Mage_Core_Block_Abstract->getChildHtml('content') #24 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Template.php(241): include('/usr/www/users/...') #25 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...') #26 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() #27 /usr/www/users/comaxc/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Template->_toHtml() #28 /usr/www/users/comaxc/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml() #29 /usr/www/users/comaxc/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput() #30 /usr/www/users/comaxc/app/code/core/Mage/Catalog/Helper/Product/View.php(147): Mage_Core_Controller_Varien_Action->renderLayout() #31 /usr/www/users/comaxc/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(2970, Object(Mage_Catalog_ProductController), Object(Varien_Object)) #32 /usr/www/users/comaxc/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction() #33 /usr/www/users/comaxc/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view') #34 /usr/www/users/comaxc/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #35 /usr/www/users/comaxc/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch() #36 /usr/www/users/comaxc/app/Mage.php(684): Mage_Core_Model_App->run(Array) #37 /usr/www/users/comaxc/index.php(87): Mage::run('shop', 'website') #38 {main}