gpt4 book ai didi

php - Magento SQLSTATE[42S22]

转载 作者:行者123 更新时间:2023-11-29 11:58:41 28 4
gpt4 key购买 nike

我刚刚收到此错误...请帮我解决这个错误!

www.sp-power.com

Error in file: "/home/sppower6/public_html/app/code/core/Mage/Eav/sql/eav_setup/mysql4-upgrade-0.7.10-0.7.11.php" - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'is_filterable' in 'field list'

Trace:
#0 /home/sppower6/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 home/sppower6/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '0.7.10', '1.6.0.1')
#2 /home/sppower6/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('0.7.10', '1.6.0.1')
#3 /home/sppower6/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/sppower6/public_html/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/sppower6/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /home/sppower6/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /home/sppower6/public_html/index.php(83): Mage::run('', 'store')
#8 {main}

最佳答案

您应该将设置脚本中的 is_filterable 列添加到正确的实体,例如产品、类别或订单:

$installer = $this;
$installer->startSetup();
$installer->addAttribute('catalog_product', 'is_filterable', array(
'type' => 'int',
'backend' => '',
'frontend' => '',
'label' => 'Is Filterable',
'input' => 'boolean',
'source' => 'eav/entity_attribute_source_boolean',
'class' => '',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'default' => '',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'unique' => false,
'group' => 'Any Group'
));

$installer->endSetup();

关于php - Magento SQLSTATE[42S22],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32755840/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com