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. :)

Thanks to everyone who replied!

David
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to