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.
Any suggestions how do we get attributes of a single product in Magento using database ??
Magento uses flat tables to centralize the attributes of products, so to query all the attributes by the ID, you can use the table catalog_product_flat, remembering that for this table to be updated, it is necessary to reindex the data.