How to pull all the product id, skus, product names, description in magento using only mysql?

后端 未结 5 2027
孤街浪徒
孤街浪徒 2020-12-13 20:55

How i will pull all the prduct ir, skus , product name (titles) and desxription using mysql from Magento database? I used following query and got all the attributes except p

5条回答
  •  孤街浪徒
    2020-12-13 21:18

    For fetching the product name please try

    $sql = "SELECT `value`
    FROM catalog_product_entity_varchar
    WHERE entity_type_id = (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product') 
    AND attribute_id = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'name' AND entity_type_id = (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product'))";
    
    $results = $readConnection->fetchAll($sql);
    

提交回复
热议问题