Created
August 23, 2011 14:24
-
-
Save fwg/1165259 to your computer and use it in GitHub Desktop.
Insert product status attribute for products that don't have it
This file contains 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
INSERT INTO catalog_product_entity_int | |
(entity_type_id,attribute_id,store_id,entity_id,value) | |
SELECT | |
4 AS entity_type_id, | |
80 AS attribute_id, | |
0 AS store_id, | |
product.entity_id, | |
1 AS value | |
FROM | |
catalog_product_entity product | |
LEFT JOIN catalog_product_entity_int status | |
ON (status.entity_id=product.entity_id and status.attribute_id=80) | |
WHERE | |
status.value IS NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment