Last active
August 29, 2015 14:28
-
-
Save dasginganinja/48374faee95b608d92d0 to your computer and use it in GitHub Desktop.
ShepNet Gallery Export (all images on one line for import into D7)
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 | |
gn.nid as "Gallery Nid", | |
gn.title as "Gallery Title", | |
a.dst as "Gallery Url", | |
gn.created as "Created", | |
u.uid as "User Uid", | |
u.name as "User Name", | |
#gi.nid as "Gallery Image Nid", | |
#gif.field_gallery_image_fid as "Gallery Image Fid", | |
GROUP_CONCAT(CONCAT("http://www.shepnetgs.org/", f.filepath)) as "Gallery Image Filepath" | |
FROM dru_shepnet.node gn | |
INNER JOIN dru_shepnet.users u | |
ON gn.uid = u.uid | |
LEFT JOIN dru_shepnet.content_type_gallery_image gi | |
ON gn.nid = gi.field_gallery_nid | |
INNER JOIN dru_shepnet.content_field_gallery_image gif | |
ON gi.nid = gif.nid and gi.vid = gif.vid | |
INNER JOIN dru_shepnet.files f | |
ON gif.field_gallery_image_fid = f.fid | |
LEFT JOIN dru_shepnet.url_alias a | |
ON a.src = CONCAT("node/", gn.nid) | |
WHERE gn.type = 'gallery' and gn.status = 1 | |
GROUP BY gn.nid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment