简体   繁体   English

magento如何使用数据库查询获取与单个产品关联的属性

[英]magento how to get attributes associated with a single product using database query

We are trying to get all attributes associated with each product using a database. 我们正在尝试使用数据库获取与每个产品关联的所有属性。

We have been used following query but I think the table we are using is not the right one. 我们已经在查询之后使用过,但是我认为我们使用的表不合适。

$sql = "SELECT attribute_id FROM catalog_product_index_eav WHERE entity_id=".$entityprodid;

This table is not the exact table which will get all attributes attached to a single product id. 该表不是将所有属性附加到单个产品ID的确切表。

Any suggestions how do we get attributes of a single product in Magento using database ?? 关于如何使用数据库在Magento中获取单个产品属性的任何建议?

Magento使用平面表集中产品的属性,因此要通过ID查询所有属性,可以使用表catalog_product_flat,记住要更新此表,有必要对数据重新编制索引。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM