Created
December 31, 2013 17:50
-
-
Save e0ipso/8200170 to your computer and use it in GitHub Desktop.
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
-- Select all media galleries and find all images in there that follow the path structure: public://images/%/%/%/% | |
SELECT n.nid, fmi.field_media_items_fid, file.uri | |
FROM | |
node n | |
INNER JOIN | |
field_data_field_media_items fmi ON fmi.entity_id = n.nid | |
INNER JOIN | |
file_managed file ON file.fid = fmi.field_media_items_fid | |
WHERE | |
n.type = 'media_gallery' | |
AND | |
file.uri LIKE 'public://images/%/%/%/%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment