{"id":68822,"date":"2021-08-06T22:39:57","date_gmt":"2021-08-07T02:39:57","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/magento-2-misc-image-related-sqls\/"},"modified":"2021-08-06T23:10:02","modified_gmt":"2021-08-07T03:10:02","slug":"magento-2-misc-image-related-sqls","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=68822","title":{"rendered":"Magento 2: Misc. Image related SQLs"},"content":{"rendered":"<p>select * from bitnami_magento.catalog_product_entity_media_gallery_value_to_entity<br \/>\nwhere value_id in (232574, 242521)<\/p>\n<p>&#8212; 232574, 242521<\/p>\n<p>select * from bitnami_magento.catalog_product_entity_media_gallery_value_to_entity<br \/>\nwhere value_id in (232574, 242521)<\/p>\n<p>&#8212; where value like &#8216;%ud6vtf2a_5ezdxueqvnr%&#8217;<\/p>\n<p>&#8211;select * from bitnami_magento.catalog_product_entity_media_gallery_value_to_entity<\/p>\n<p>select * from bitnami_magento.catalog_product_entity_media_gallery<br \/>\n&#8212; where value_id in (237733, 237734)<br \/>\nwhere value like &#8216;%ud6vtf2a_5ezdxueqvnr%&#8217;<\/p>\n<p>update bitnami_magento.catalog_product_entity_media_gallery<br \/>\nset value = &#8216;\/u\/d\/ud6vtf2a_5ezdxueqvnr1dyny_1.jpeg&#8217;<br \/>\nwhere value = &#8216;\/u\/d\/ud6vtf2a_5ezdxueqvnr1dyny.jpeg&#8217; and value_id=242521<\/p>\n<p>select * from bitnami_magento.catalog_product_entity_media_gallery_value<br \/>\n&#8212; where value_id in (232574, 242521)<br \/>\nwhere entity_id in (70414)<\/p>\n<p>select * from bitnami_magento.catalog_product_entity_media_gallery_value<br \/>\nwhere label is not null<\/p>\n<p>70414 shopforsoul-PTO_06RSLOC0<br \/>\n237733, 237734<\/p>\n<p>insert into bitnami_magento.catalog_product_entity_media_gallery_value values(237733, 0, 70414, &#8221;, 3, 0, 37613)<\/p>\n<p>select max(record_id) from catalog_product_entity_media_gallery_value<\/p>\n<p>insert into catalog_product_entity_media_gallery_value_to_entity values (237733, 70414)<\/p>\n<p>select distinct(attribute_id) from bitnami_magento.catalog_product_entity_media_gallery<\/p>\n","protected":false},"excerpt":{"rendered":"<p>select * from bitnami_magento.catalog_product_entity_media_gallery_value_to_entity where value_id in (232574, 242521) &#8212; 232574, 242521 select * from bitnami_magento.catalog_product_entity_media_gallery_value_to_entity where value_id in (232574, 242521) &#8212; where value like &#8216;%ud6vtf2a_5ezdxueqvnr%&#8217; &#8211;select * from bitnami_magento.catalog_product_entity_media_gallery_value_to_entity select * from bitnami_magento.catalog_product_entity_media_gallery &#8212; where value_id in (237733, 237734) where value like &#8216;%ud6vtf2a_5ezdxueqvnr%&#8217; update bitnami_magento.catalog_product_entity_media_gallery set value = &#8216;\/u\/d\/ud6vtf2a_5ezdxueqvnr1dyny_1.jpeg&#8217; where value = &#8216;\/u\/d\/ud6vtf2a_5ezdxueqvnr1dyny.jpeg&#8217; and &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=68822\">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-68822","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":68823,"url":"http:\/\/bangla.sitestree.com\/?p=68823","url_meta":{"origin":68822,"position":0},"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":68814,"url":"http:\/\/bangla.sitestree.com\/?p=68814","url_meta":{"origin":68822,"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":27105,"url":"http:\/\/bangla.sitestree.com\/?p=27105","url_meta":{"origin":68822,"position":2},"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":14848,"url":"http:\/\/bangla.sitestree.com\/?p=14848","url_meta":{"origin":68822,"position":3},"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":[]},{"id":25057,"url":"http:\/\/bangla.sitestree.com\/?p=25057","url_meta":{"origin":68822,"position":4},"title":"Misc Info on : How to select a small cloud\/VPS hosting plan #Root","author":"Author-Check- Article-or-Video","date":"April 15, 2021","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;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14842,"url":"http:\/\/bangla.sitestree.com\/?p=14842","url_meta":{"origin":68822,"position":5},"title":"Misc Linux Commands (CentOS\/Redhat) that you might find useful","author":"Sayed","date":"June 28, 2019","format":false,"excerpt":"1 php -v 2 yum repolist 3 yum repolist | remi 4 yum repolist | grep remi 5 yum repolist | grep ius 6 yum makecache 7 yum update 8 reboot 9 adduser ariro 10 passwd ariro 11 usermod -a -G apache ariro 12 adduser magento 13 passwd magento 14\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\/68822","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=68822"}],"version-history":[{"count":2,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/68822\/revisions"}],"predecessor-version":[{"id":68833,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/68822\/revisions\/68833"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68822"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}