【问题标题】:Magento Foreign Key ConstraintsMagento 外键约束
【发布时间】:2015-05-05 08:55:05
【问题描述】:

没有人可以订购 Magento 网站。我有这个消息:

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`bdd_www14`.`salesrule_product_attribute`, CONSTRAINT `FK_SALESRULE_PRODUCT_ATTRIBUTE_CUSTOMER_GROUP` FOREIGN KEY (`customer_group_id`) REFERENCES `customer_group` (`customer_group_id`) O)' in [...]/htdocs/lib/Zend/Db/Statement/Pdo.php:234

我怎样才能摆脱这个错误?

【问题讨论】:

  • 你能不能给我网址,让我看看。
  • 您正在尝试插入或更新破坏数据库上定义的约束的行。如果这是一个真正的生产问题,请回滚到您站点的最后部署版本。如果没有更多信息,我认为我们无能为力。
  • 网站网址?

标签: sql magento foreign-keys constraints


【解决方案1】:

很好……

如果有人有此问题,则问题是由于删除了一组用户。我已经恢复了数据库中的组,一切正常。

【讨论】:

    猜你喜欢
    • 2015-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-08
    • 2014-01-17
    相关资源
    最近更新 更多