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

后端 未结 5 2021
孤街浪徒
孤街浪徒 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:30

    Here is another query to show entity_id, product_name, sku

    SELECT
        catalog_product_entity_varchar.entity_id,
        catalog_product_entity_varchar.`value` AS product_name,
        catalog_product_entity.sku
    FROM
        catalog_product_entity_varchar
    INNER JOIN catalog_product_entity ON catalog_product_entity_varchar.entity_id = catalog_product_entity.entity_id
    WHERE
        catalog_product_entity_varchar.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'
        )
    )
    

提交回复
热议问题