Skip to content

Instantly share code, notes, and snippets.

@cccaldas
Created December 3, 2012 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cccaldas/4197479 to your computer and use it in GitHub Desktop.
Save cccaldas/4197479 to your computer and use it in GitHub Desktop.
SELECT pid, caption, aid, owner, link, src_big, src_small, created, modified FROM photo WHERE aid IN (
   SELECT aid FROM album WHERE owner IN (
         SELECT uid2 FROM friend WHERE uid1=me()
     )
     AND (
         (type = 'app' AND name = 'Camera Photos')
     )
)
AND created > 1353867084 ORDER BY created DESC
LIMIT 30000
SELECT pid, caption, aid, owner, link, src_big, src_small, created, modified FROM photo WHERE aid IN (
   SELECT aid FROM album WHERE owner IN (
         SELECT uid2 FROM friend WHERE uid1=me()
     )
     AND (
         (type = 'mobile')
     )
)
AND created > 1353867084 ORDER BY created DESC
LIMIT 30000
SELECT pid, caption, aid, owner, link, src_big, src_small, created, modified FROM photo WHERE aid IN (
   SELECT aid FROM album WHERE owner IN (
         SELECT uid2 FROM friend WHERE uid1=me()
     )
     AND (
         (type = 'normal' AND name <> 'Cover Photos')
     )
)
AND created > 1353867084 ORDER BY created DESC
LIMIT 30000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment