{"id":68814,"date":"2021-08-06T22:36:33","date_gmt":"2021-08-07T02:36:33","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/magento-2-deactivate-products-without-images\/"},"modified":"2021-08-06T23:05:03","modified_gmt":"2021-08-07T03:05:03","slug":"magento-2-deactivate-products-without-images","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=68814","title":{"rendered":"Magento 2: Deactivate Products without images"},"content":{"rendered":"<p>update catalog_product_entity_int<br \/>\n&#8212; select * from catalog_product_entity_int<br \/>\nset catalog_product_entity_int.value = 2<br \/>\nwhere (catalog_product_entity_int.attribute_id = 97) and catalog_product_entity_int.entity_id in (<br \/>\nselect entity_id from (<br \/>\nSelect distinct(product.entity_id)<br \/>\nFROM bitnami_magento.catalog_product_entity product<br \/>\nleft join catalog_product_entity_media_gallery_value_to_entity valentity on valentity.entity_id = product.entity_id<br \/>\nleft join catalog_product_entity_media_gallery image on image.value_id = valentity.value_id and (image.attribute_id in (90))<br \/>\ninner 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)<br \/>\nwhere product.entity_id not in (select entity_id from catalog_product_entity_media_gallery_value_to_entity)<br \/>\n) as c )<\/p>\n","protected":false},"excerpt":{"rendered":"<p>update catalog_product_entity_int &#8212; 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 catalog_product_entity_int status_t on (status_t.entity_id = &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=68814\">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":[1942,182],"tags":[],"class_list":["post-68814","post","type-post","status-publish","format-standard","hentry","category-magento-2-operations-using-sql","category---blog","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":27105,"url":"http:\/\/bangla.sitestree.com\/?p=27105","url_meta":{"origin":68814,"position":0},"title":"Magento 2, Update a Product Attribute with SQL","author":"Sayed","date":"May 11, 2021","format":false,"excerpt":"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 >\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":68823,"url":"http:\/\/bangla.sitestree.com\/?p=68823","url_meta":{"origin":68814,"position":1},"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":68825,"url":"http:\/\/bangla.sitestree.com\/?p=68825","url_meta":{"origin":68814,"position":2},"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":68822,"url":"http:\/\/bangla.sitestree.com\/?p=68822","url_meta":{"origin":68814,"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":68814,"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":14848,"url":"http:\/\/bangla.sitestree.com\/?p=14848","url_meta":{"origin":68814,"position":5},"title":"Misc Info on : How to select a small cloud\/VPS hosting plan","author":"Sayed","date":"June 30, 2019","format":false,"excerpt":"Plesk (Hosting\/Cloud-Hosting Control Panel) is not free; however, VPS provider such as Vultr might offer Web Admin SE version for free Plesk Documentation and Help Portal https:\/\/docs.plesk.com\/en-US\/onyx\/deployment-guide\/79348\/ -- AWS lightsail looks to be a good choice for very small cloud based hosting. For VPS Price starting at USD 3.50\/month, though\u2026","rel":"","context":"In &quot;Magento 2&quot;","block_context":{"text":"Magento 2","link":"http:\/\/bangla.sitestree.com\/?cat=1907"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/68814","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=68814"}],"version-history":[{"count":2,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/68814\/revisions"}],"predecessor-version":[{"id":68831,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/68814\/revisions\/68831"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68814"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}