Forked from tegansnyder/Magent_Product_Category_Query.sql
Created
May 25, 2017 07:02
-
-
Save pije76/9c54c00c9a70408fcdba29f9f9361536 to your computer and use it in GitHub Desktop.
Query to retrieve all product ids and the category they belong to in Magento.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT `e`.entity_id, `at_category_id`.`category_id` | |
FROM `catalog_product_entity` AS `e` | |
LEFT JOIN `catalog_category_product` AS `at_category_id` | |
ON (at_category_id.`product_id`=e.entity_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment