代码之家  ›  专栏  ›  技术社区  ›  PHP

Magento数据库结构?

  •  2
  • PHP  · 技术社区  · 15 年前

    目前正在与Magento项目合作。 在这一点上我有点结巴。 也就是管理员添加任何子类别/类别时 通过

    管理类别-客户设计

    这里有两种选择

    主动从 主动到 … 任何知道Magento数据库的人都能告诉我这两个值存储在哪里或哪个表中吗?

    感谢您的建议或帮助!

    2 回复  |  直到 10 年前
        1
  •  2
  •   Joe Mastey    15 年前

    我在下面列出了目录类别的属性。由于类别是EAV类型,因此需要查找特定的子表以获取值。在这种情况下, custom_design_from custom_design_to 是日期时间值,而实体的名称是 catalog_category_entity ,所以你想要的桌子是 catalog_category_entity_datetime .

    您将发现的下一个问题是获取正确的属性ID。由于它们很容易更改,下面是要运行的SQL查询,以便获取它们:

    select attribute_id, attribute_code from eav_attribute where entity_type_id = 3 and attribute_code in ('custom_design_from', 'custom_design_to');
    

    我得到52和53,但YmWV。希望有帮助!

    谢谢, 乔

    +----------------------+--------------+
    | attribute_code       | backend_type |
    +----------------------+--------------+
    | name                 | varchar      |
    | is_active            | int          |
    | url_key              | varchar      |
    | description          | text         |
    | image                | varchar      |
    | meta_title           | varchar      |
    | meta_keywords        | text         |
    | meta_description     | text         |
    | display_mode         | varchar      |
    | landing_page         | int          |
    | is_anchor            | int          |
    | path                 | static       |
    | position             | static       |
    | all_children         | text         |
    | path_in_store        | text         |
    | children             | text         |
    | url_path             | varchar      |
    | custom_design        | varchar      |
    | custom_design_apply  | int          |
    | custom_design_from   | datetime     |
    | custom_design_to     | datetime     |
    | page_layout          | varchar      |
    | custom_layout_update | text         |
    | level                | static       |
    | children_count       | static       |
    | available_sort_by    | text         |
    | default_sort_by      | varchar      |
    | include_in_menu      | int          |
    +----------------------+--------------+
    
        2
  •  0
  •   Rakesh Jesadiya    10 年前
    Active from is an attribute whose attribute_code is custom_design_from(attribute_id 57) and Active To is an attribute whose attribute_code(attribute_id 58) is custom_design_to.
    This both attributes value are stored in database table `catalog_category_entity_datetime`.
    

    检查上表,实体的类值为“id”,属性“id”为“57”,活动源值存储在 value 与值相同的表字段存储在 价值 实体ID为类别ID的字段,属性ID为58。

    推荐文章