{"id":27105,"date":"2021-05-11T22:11:55","date_gmt":"2021-05-12T02:11:55","guid":{"rendered":"https:\/\/bangla.salearningschool.com\/recent-posts\/magento-2-update-a-product-attribute-with-sql\/"},"modified":"2021-05-11T22:11:55","modified_gmt":"2021-05-12T02:11:55","slug":"magento-2-update-a-product-attribute-with-sql","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=27105","title":{"rendered":"Magento 2, Update a Product Attribute with SQL"},"content":{"rendered":"<p>update catalog_product_entity_int<\/p>\n<p>set catalog_product_entity_int.value = 1<\/p>\n<p>where (catalog_product_entity_int.attribute_id = 97) and catalog_product_entity_int.entity_id = (<\/p>\n<p>select entity_id from (<\/p>\n<p>SELECT product.entity_id as entity_id FROM bitnami_magento.catalog_product_entity product<\/p>\n<p>inner join catalog_product_entity_decimal price on price.entity_id = product.entity_id and (price.attribute_id in (78))<\/p>\n<p>inner join catalog_product_entity_int status_t on (status_t.entity_id = product.entity_id) and (status_t.attribute_id=97)<\/p>\n<p>where (price.value &gt; 5 and price.value &lt;= 50)<\/p>\n<p>and (status_t.value = 2)<\/p>\n<p>) as c<\/p>\n<p>)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>update catalog_product_entity_int set catalog_product_entity_int.value = 1 where (catalog_product_entity_int.attribute_id = 97) and catalog_product_entity_int.entity_id = ( select entity_id from ( SELECT product.entity_id as entity_id FROM bitnami_magento.catalog_product_entity product inner join catalog_product_entity_decimal price on price.entity_id = product.entity_id and (price.attribute_id in (78)) inner join catalog_product_entity_int status_t on (status_t.entity_id = product.entity_id) and (status_t.attribute_id=97) where (price.value &gt; 5 and price.value &lt;= 50) &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=27105\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[182],"tags":[],"class_list":["post-27105","post","type-post","status-publish","format-standard","hentry","category---blog","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":68825,"url":"http:\/\/bangla.sitestree.com\/?p=68825","url_meta":{"origin":27105,"position":0},"title":"Magento2: update product attributes using sql","author":"Sayed","date":"August 6, 2021","format":false,"excerpt":"cat update_product_attributes_using_sql.sql update catalog_product_entity_int -- select * from catalog_product_entity_int set catalog_product_entity_int.value = 1 where (catalog_product_entity_int.attribute_id = 97) and catalog_product_entity_int.entity_id = ( select entity_id from ( SELECT product.entity_id as entity_id FROM bitnami_magento.catalog_product_entity product inner join catalog_product_entity_decimal price on price.entity_id = product.entity_id and (price.attribute_id in (78)) inner join catalog_product_entity_int status_t on (status_t.entity_id\u2026","rel":"","context":"In &quot;Magento 2 : Operations using SQL&quot;","block_context":{"text":"Magento 2 : Operations using SQL","link":"http:\/\/bangla.sitestree.com\/?cat=1942"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":68814,"url":"http:\/\/bangla.sitestree.com\/?p=68814","url_meta":{"origin":27105,"position":1},"title":"Magento 2: Deactivate Products without images","author":"Sayed","date":"August 6, 2021","format":false,"excerpt":"update catalog_product_entity_int -- select * from catalog_product_entity_int set catalog_product_entity_int.value = 2 where (catalog_product_entity_int.attribute_id = 97) and catalog_product_entity_int.entity_id in ( select entity_id from ( Select distinct(product.entity_id) FROM bitnami_magento.catalog_product_entity product left join catalog_product_entity_media_gallery_value_to_entity valentity on valentity.entity_id = product.entity_id left join catalog_product_entity_media_gallery image on image.value_id = valentity.value_id and (image.attribute_id in (90)) inner join\u2026","rel":"","context":"In &quot;Magento 2 : Operations using SQL&quot;","block_context":{"text":"Magento 2 : Operations using SQL","link":"http:\/\/bangla.sitestree.com\/?cat=1942"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":68823,"url":"http:\/\/bangla.sitestree.com\/?p=68823","url_meta":{"origin":27105,"position":2},"title":"Magento 2: Update data for a custom product attribute","author":"Sayed","date":"August 6, 2021","format":false,"excerpt":"use bitnami_magento; SELECT * FROM bitnami_magento.catalog_product_entity_varcharwhere ( attribute_id = 73 ) -- and (value = '')limit 10 replace into bitnami_magento.catalog_product_entity_varchar (attribute_id, store_id, entity_id, value )SELECT 181, 0, product.entity_id, left(concat(\"https:\/\/www.amazon.com\/s?k=\", product.value),255)FROM bitnami_magento.catalog_product_entity_varchar productinner join catalog_product_entity_int status_t on ( status_t.entity_id = product.entity_id ) and ( status_t.attribute_id = 97 and status_t.value = 1\u2026","rel":"","context":"In &quot;Magento 2 : Operations using SQL&quot;","block_context":{"text":"Magento 2 : Operations using SQL","link":"http:\/\/bangla.sitestree.com\/?cat=1942"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":68822,"url":"http:\/\/bangla.sitestree.com\/?p=68822","url_meta":{"origin":27105,"position":3},"title":"Magento 2: Misc. Image related SQLs","author":"Sayed","date":"August 6, 2021","format":false,"excerpt":"select * from bitnami_magento.catalog_product_entity_media_gallery_value_to_entity where value_id in (232574, 242521) -- 232574, 242521 select * from bitnami_magento.catalog_product_entity_media_gallery_value_to_entity where value_id in (232574, 242521) -- where value like '%ud6vtf2a_5ezdxueqvnr%' --select * from bitnami_magento.catalog_product_entity_media_gallery_value_to_entity select * from bitnami_magento.catalog_product_entity_media_gallery -- where value_id in (237733, 237734) where value like '%ud6vtf2a_5ezdxueqvnr%' update bitnami_magento.catalog_product_entity_media_gallery set value = '\/u\/d\/ud6vtf2a_5ezdxueqvnr1dyny_1.jpeg'\u2026","rel":"","context":"In &quot;Magento 2 : Operations using SQL&quot;","block_context":{"text":"Magento 2 : Operations using SQL","link":"http:\/\/bangla.sitestree.com\/?cat=1942"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16439,"url":"http:\/\/bangla.sitestree.com\/?p=16439","url_meta":{"origin":27105,"position":4},"title":"Mysql error after upgrading magento 2.3.2 to 2.3.3","author":"Sayed","date":"November 30, 2019","format":false,"excerpt":"Solution to: SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable), query was: CREATE TRIGGER trg_catalog_product_entity_after_insert AFTER INSERT ON catalog_product_entity FOR EACH ROW BEGIN INSERT IGNORE INTO `scconnector_google_feed_cl` (`entity_id`) VALUES (NEW.`entity_id`); END Sol:\u2026","rel":"","context":"In &quot;AI ML DS RL DL NN NLP Data Mining Optimization&quot;","block_context":{"text":"AI ML DS RL DL NN NLP Data Mining Optimization","link":"http:\/\/bangla.sitestree.com\/?cat=1910"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17188,"url":"http:\/\/bangla.sitestree.com\/?p=17188","url_meta":{"origin":27105,"position":5},"title":"xls_auto_pricing_data_for_Uk_eu","author":"Sayed","date":"June 19, 2020","format":false,"excerpt":"\/****** Object: StoredProcedure [dbo].[xls_auto_pricing_data_for_Uk_eu] Script Date: 2020-06-19 10:15:42 PM ******\/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO remove-this-phrase-- ============================================= remove-this-phrase-- Author: <Author,,Name> remove-this-phrase-- Create date: <Create Date,,> remove-this-phrase-- Description: <Description,,> remove-this-phrase-- ============================================= CREATE PROCEDURE [dbo].[xls_auto_pricing_data_for_Uk_eu] AS BEGIN remove-this-phrase-- SET NOCOUNT ON added to prevent extra result sets from remove-this-phrase--\u2026","rel":"","context":"In &quot;manage-selling-on-amazon-using-sql&quot;","block_context":{"text":"manage-selling-on-amazon-using-sql","link":"http:\/\/bangla.sitestree.com\/?cat=1915"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/27105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27105"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/27105\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27105"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}