Skip to content

Instantly share code, notes, and snippets.

@oleander
Created February 25, 2011 23:51
Show Gist options
  • Save oleander/844737 to your computer and use it in GitHub Desktop.
Save oleander/844737 to your computer and use it in GitHub Desktop.
"SELECT DISTINCT movies.*, images.url as posters FROM `movies` INNER JOIN `casts` ON `casts`.`movie_id` = `movies`.`id` INNER JOIN `sources` ON `sources`.`id` = `casts`.`source_id` INNER JOIN `sites` ON `sites`.`id` = `casts`.`site_id` INNER JOIN `images` ON `images`.`movie_id` = `movies`.`id` INNER JOIN `sizes` ON `sizes`.`id` = `images`.`size_id` WHERE (sources.priority >= 1) AND (sites.open = 0) AND (sizes.name = 'mid') LIMIT 50 OFFSET 0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment