macromedia.coldfusion.database_access
[Top] [All Lists]

Re: SQL query problem

Subject: Re: SQL query problem
From: "Dan Bracuk" <webforumsuser@xxxxxxxxxxxxxx>
Date: Wed, 30 Jul 2008 15:21:58 +0000 (UTC)
Newsgroups: macromedia.coldfusion.database_access

[q][i]Originally posted by: [b][b]Mattastic[/b][/b][/i]
 I have another problem with my query.

 Currently I'm using this sql to extract courses with multiple sessions:

 SELECT * FROM ptcourses08 c , coursesession cs 
 WHERE 0=0 
 AND c.courseid = cs.sessioncourse
 ORDER BY c.courseTitle

 This works fine for courses that have sessions, but it doesnt pick up full 
time courses that dont have sessions, courses that just appear in the 
ptcourses08 table only.

 Can anyone tell me how I can get all the courses?

 Thanks in advance[/q]
 As long as you keep your current database design, you are going to have these 
problems.  A better way to do it is for the course session table to store every 
occurence of a course, not just the ones that occur more than once a year.



<Prev in Thread] Current Thread [Next in Thread>