You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT main.value_id, main.value AS file, main.media_type, entity.row_id, IFNULL(value.label, default_value.label) AS label, IFNULL(value.position, default_value.position) AS position, IFNULL(value.disabled, default_value.disabled) AS disabled, default_value.label AS label_default, default_value.position AS position_default, default_value.disabled AS disabled_default, IFNULL(value_video.provider, default_value_video.provider) AS video_provider, IFNULL(value_video.url, default_value_video.url) AS video_url, IFNULL(value_video.title, default_value_video.title) AS video_title, IFNULL(value_video.description, default_value_video.description) AS video_description, IFNULL(value_video.metadata, default_value_video.metadata) AS video_metadata, default_value_video.provider AS video_provider_default, default_value_video.url AS video_url_default, default_value_video.title AS video_title_default, default_value_video.description AS video_description_default, default_value_video.metadata AS video_metadata_default FROM catalog_product_entity_media_gallery AS main INNER JOIN catalog_product_entity_media_gallery_value_to_entity AS entity ON main.value_id = entity.value_id LEFT JOIN catalog_product_entity_media_gallery_value AS value ON main.value_id = value.value_id AND value.store_id = 1 AND value.row_id = entity.row_id LEFT JOIN catalog_product_entity_media_gallery_value AS default_value ON main.value_id = default_value.value_id AND default_value.store_id = 0 AND default_value.row_id = entity.row_id LEFT JOIN catalog_product_entity_media_gallery_value_video AS value_video ON value.value_id = value_video.value_id AND value.store_id = value_video.store_id LEFT JOIN catalog_product_entity_media_gallery_value_video AS default_value_video ON default_value.value_id = default_value_video.value_id AND default_value.store_id = default_value_video.store_id WHERE (main.attribute_id = '88') AND (main.disabled = 0) AND (entity.row_id = '81983') ORDER BY IF(value.position IS NULL, default_value.position, value.position)
SELECT main.value_id, main.value AS file, main.media_type, entity.row_id, IFNULL(value.label, default_value.label) AS label, IFNULL(value.position, default_value.position) AS position, IFNULL(value.disabled, default_value.disabled) AS disabled, default_value.label AS label_default, default_value.position AS position_default, default_value.disabled AS disabled_default, IFNULL(value_video.provider, default_value_video.provider) AS video_provider, IFNULL(value_video.url, default_value_video.url) AS video_url, IFNULL(value_video.title, default_value_video.title) AS video_title, IFNULL(value_video.description, default_value_video.description) AS video_description, IFNULL(value_video.metadata, default_value_video.metadata) AS video_metadata, default_value_video.provider AS video_provider_default, default_value_video.url AS video_url_default, default_value_video.title AS video_title_default, default_value_video.description AS video_description_default, default_value_video.metadata AS video_metadata_default FROM catalog_product_entity_media_gallery AS main
| INNER JOIN catalog_product_entity_media_gallery_value_to_entity AS entity ON main.value_id = entity.value_id
| LEFT JOIN catalog_product_entity_media_gallery_value AS value ON main.value_id = value.value_id AND value.store_id = 1 AND value.row_id = entity.row_id
| LEFT JOIN catalog_product_entity_media_gallery_value AS default_value ON main.value_id = default_value.value_id AND default_value.store_id = 0 AND default_value.row_id = entity.row_id
| LEFT JOIN catalog_product_entity_media_gallery_value_video AS value_video ON value.value_id = value_video.value_id AND value.store_id = value_video.store_id
| LEFT JOIN catalog_product_entity_media_gallery_value_video AS default_value_video ON default_value.value_id = default_value_video.value_id AND default_value.store_id = default_value_video.store_id WHERE (main.attribute_id = '88') AND (main.disabled = 0) AND (entity.row_id = '81983') ORDER BY IF(value.position IS NULL, default_value.position, value.position) ASC
The text was updated successfully, but these errors were encountered:
SQL to select Gallery stuff for MAgento 2
SELECT
main
.value_id
,main
.value
ASfile
,main
.media_type
,entity
.row_id
, IFNULL(value
.label
,default_value
.label
) ASlabel
, IFNULL(value
.position
,default_value
.position
) ASposition
, IFNULL(value
.disabled
,default_value
.disabled
) ASdisabled
,default_value
.label
ASlabel_default
,default_value
.position
ASposition_default
,default_value
.disabled
ASdisabled_default
, IFNULL(value_video
.provider
,default_value_video
.provider
) ASvideo_provider
, IFNULL(value_video
.url
,default_value_video
.url
) ASvideo_url
, IFNULL(value_video
.title
,default_value_video
.title
) ASvideo_title
, IFNULL(value_video
.description
,default_value_video
.description
) ASvideo_description
, IFNULL(value_video
.metadata
,default_value_video
.metadata
) ASvideo_metadata
,default_value_video
.provider
ASvideo_provider_default
,default_value_video
.url
ASvideo_url_default
,default_value_video
.title
ASvideo_title_default
,default_value_video
.description
ASvideo_description_default
,default_value_video
.metadata
ASvideo_metadata_default
FROMcatalog_product_entity_media_gallery
ASmain
INNER JOINcatalog_product_entity_media_gallery_value_to_entity
ASentity
ON main.value_id = entity.value_id LEFT JOINcatalog_product_entity_media_gallery_value
ASvalue
ON main.value_id = value.value_id AND value.store_id = 1 AND value.row_id = entity.row_id LEFT JOINcatalog_product_entity_media_gallery_value
ASdefault_value
ON main.value_id = default_value.value_id AND default_value.store_id = 0 AND default_value.row_id = entity.row_id LEFT JOINcatalog_product_entity_media_gallery_value_video
ASvalue_video
ON value.value_id = value_video.value_id AND value.store_id = value_video.store_id LEFT JOINcatalog_product_entity_media_gallery_value_video
ASdefault_value_video
ON default_value.value_id = default_value_video.value_id AND default_value.store_id = default_value_video.store_id WHERE (main.attribute_id = '88') AND (main.disabled = 0) AND (entity.row_id = '81983') ORDER BY IF(value.position IS NULL, default_value.position, value.position)SELECT
main
.value_id
,main
.value
ASfile
,main
.media_type
,entity
.row_id
, IFNULL(value
.label
,default_value
.label
) ASlabel
, IFNULL(value
.position
,default_value
.position
) ASposition
, IFNULL(value
.disabled
,default_value
.disabled
) ASdisabled
,default_value
.label
ASlabel_default
,default_value
.position
ASposition_default
,default_value
.disabled
ASdisabled_default
, IFNULL(value_video
.provider
,default_value_video
.provider
) ASvideo_provider
, IFNULL(value_video
.url
,default_value_video
.url
) ASvideo_url
, IFNULL(value_video
.title
,default_value_video
.title
) ASvideo_title
, IFNULL(value_video
.description
,default_value_video
.description
) ASvideo_description
, IFNULL(value_video
.metadata
,default_value_video
.metadata
) ASvideo_metadata
,default_value_video
.provider
ASvideo_provider_default
,default_value_video
.url
ASvideo_url_default
,default_value_video
.title
ASvideo_title_default
,default_value_video
.description
ASvideo_description_default
,default_value_video
.metadata
ASvideo_metadata_default
FROMcatalog_product_entity_media_gallery
ASmain
| INNER JOIN
catalog_product_entity_media_gallery_value_to_entity
ASentity
ON main.value_id = entity.value_id| LEFT JOIN
catalog_product_entity_media_gallery_value
ASvalue
ON main.value_id = value.value_id AND value.store_id = 1 AND value.row_id = entity.row_id| LEFT JOIN
catalog_product_entity_media_gallery_value
ASdefault_value
ON main.value_id = default_value.value_id AND default_value.store_id = 0 AND default_value.row_id = entity.row_id| LEFT JOIN
catalog_product_entity_media_gallery_value_video
ASvalue_video
ON value.value_id = value_video.value_id AND value.store_id = value_video.store_id| LEFT JOIN
catalog_product_entity_media_gallery_value_video
ASdefault_value_video
ON default_value.value_id = default_value_video.value_id AND default_value.store_id = default_value_video.store_id WHERE (main.attribute_id = '88') AND (main.disabled = 0) AND (entity.row_id = '81983') ORDER BY IF(value.position IS NULL, default_value.position, value.position) ASCThe text was updated successfully, but these errors were encountered: