[nycphp-talk] SQL question
Mark Armendariz
lists at enobrev.com
Mon Jul 23 16:36:08 EDT 2007
David Krings wrote:
> Rob Marscher wrote:
>> SELECT
>> s.StoryboardID
>>> FROM cupscourses c
>> LEFT JOIN cupsmodules m ON m.CourseID = c.CourseID
>> LEFT JOIN cupslessons l ON l.ModuleID = m.ModuleID
>> LEFT JOIN cupspages p ON p.LessonID = l.LessonID
>> LEFT JOIN cupsstoryboards s ON s.PageID = p.PageID
>> WHERE c.CourseID = 23
>> ORDER BY m.Module_Position, l.Lesson_Position, p.Page_Position
> Dingdingding! The left join really did the trick and I now get what I
> expect to get. So, I guess now that I got this settled I better learn
> what a left join is in case someone asks me to explain my code. :)
Sorry I didn't get back in sooner, but it looks as though Rob took care
of business.
Glad it all worked out...
Mark
More information about the talk
mailing list
Automatic Email Organization without missing anything!