Created
November 19, 2011 03:24
-
-
Save bluemango/1378383 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 `lessons`.`id` * 1 + 0 AS `id`, | |
`spaces`.`id` AS `published_space_id` | |
FROM lessons | |
LEFT JOIN readings on lessons.id = readings.lesson_id AND lessons.draft = 0 | |
LEFT JOIN sections on readings.section_id = sections.id AND sections.hidden = 0 | |
LEFT JOIN manuals on manuals.id = sections.manual_id AND manuals.draft = 0 | |
LEFT JOIN assets_spaces as manual_assets ON manual_assets.asset_id = manuals.id AND manual_assets.asset_type = "Manual" | |
LEFT JOIN spaces ON manual_assets.space_id = spaces.id' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment