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` = '42') 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` = '42') AND (`at_is_active`.`store_id` = 1) 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 MySQL server version for the right syntax to use near ')) AND (IF(at_is_active.value_id > 0, at_is_active.value, at_is_active_default.v' 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` = '42') 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` = '42') AND (`at_is_active`.`store_id` = 1) 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 /var/www/html/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/html/magento/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/html/magento/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `e`.*, I...', Array)
#4 /var/www/html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `e`.*, I...', Array)
#5 /var/www/html/magento/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `e`.*, I...', Array)
#6 /var/www/html/magento/lib/Varien/Data/Collection/Db.php(740): Zend_Db_Adapter_Abstract->fetchAll('SELECT `e`.*, I...', Array)
#7 /var/www/html/magento/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1045): Varien_Data_Collection_Db->_fetchAll('SELECT `e`.*, I...')
#8 /var/www/html/magento/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false)
#9 /var/www/html/magento/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php(225): Mage_Eav_Model_Entity_Collection_Abstract->load(false, false)
#10 /var/www/html/magento/lib/Varien/Data/Collection.php(752): Mage_Catalog_Model_Resource_Category_Collection->load()
#11 /var/www/html/magento/app/code/community/Creare/CreareSeoCore/Helper/Meta.php(99): Varien_Data_Collection->count()
#12 /var/www/html/magento/app/code/community/Creare/CreareSeoCore/Helper/Meta.php(70): Creare_CreareSeoCore_Helper_Meta->productAttribute(Object(Mage_Catalog_Model_Product), 'first_category')
#13 /var/www/html/magento/app/code/community/Creare/CreareSeoCore/Helper/Meta.php(7): Creare_CreareSeoCore_Helper_Meta->shortcode('[name] | [first...')
#14 /var/www/html/magento/app/code/community/Creare/CreareSeoCore/Model/Observer.php(330): Creare_CreareSeoCore_Helper_Meta->getDefaultTitle('product')
#15 /var/www/html/magento/app/code/community/Creare/CreareSeoCore/Model/Observer.php(303): Creare_CreareSeoCore_Model_Observer->setConfigTitle('product')
#16 /var/www/html/magento/app/code/community/Creare/CreareSeoCore/Model/Observer.php(261): Creare_CreareSeoCore_Model_Observer->getTitle()
#17 /var/www/html/magento/app/code/core/Mage/Core/Model/App.php(1358): Creare_CreareSeoCore_Model_Observer->setTitle(Object(Varien_Event_Observer))
#18 /var/www/html/magento/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Creare_CreareSeoCore_Model_Observer), 'setTitle', Object(Varien_Event_Observer))
#19 /var/www/html/magento/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#20 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(351): Mage::dispatchEvent('controller_acti...', Array)
#21 /var/www/html/magento/app/code/core/Mage/Catalog/Helper/Product/View.php(73): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#22 /var/www/html/magento/app/code/core/Mage/Catalog/Helper/Product/View.php(144): Mage_Catalog_Helper_Product_View->initProductLayout(Object(Mage_Catalog_Model_Product), Object(Mage_Catalog_ProductController))
#23 /var/www/html/magento/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(679, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#24 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#25 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#26 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#27 /var/www/html/magento/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#28 /var/www/html/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#29 /var/www/html/magento/index.php(83): Mage::run('', 'store')
#30 {main}