Skip to content

Instantly share code, notes, and snippets.

@cwittyman
Forked from mrbongiolo/fql_query_page_photos.fql
Last active August 29, 2015 14:03
Show Gist options
  • Save cwittyman/347722c5d69dd5b73f6c to your computer and use it in GitHub Desktop.
Save cwittyman/347722c5d69dd5b73f6c to your computer and use it in GitHub Desktop.
# Formatted for readability
SELECT src, src_height, src_width, src_big, src_small, src_small_height, src_small_width
FROM photo
WHERE pid IN (SELECT pid
FROM photo_tag
WHERE subject='124205187693820' )
OR
pid IN (SELECT pid
FROM photo
WHERE aid IN (SELECT aid
FROM album
WHERE owner='124205187693820' AND type!='profile' )
)
# One line query
SELECT src, src_height, src_big, src_width, src_small, src_small_height, src_small_width FROM photo WHERE pid IN (SELECT pid FROM photo_tag WHERE subject='124205187693820') OR pid IN (SELECT pid FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner='124205187693820' AND type!='profile'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment