Code: Select all
$getDatesAssociatedWithThisCourse = "SELECT tblCourses.courseID,
tblCourses.duration, tblSchedule.day, tblSchedule.monthID, tblSchedule.yearID,
tblYear.year
FROM tblCourses, tblSchedule, tblYear, tblMonth
WHERE tblCourses.courseID = tblSchedule.courseID
AND tblSchedule.yearID = tblYear.yearID
AND tblSchedule.monthID = tblMonth.monthID
AND tblCourses.courseID = ".$link."
AND tblMonth.monthID = ".$idx." ORDER BY monthID ASC";
//echo $getDatesAssociatedWithThisCourse;
$dboutput_dates = mysql_query($getDatesAssociatedWithThisCourse);I've tried if ($dboutput_dates == false){ and if ($dboutput_dates == null){ and a few others but nothing.
As I am new to php/mysql, can I assume that even if there is no match made, something is returned? ie my IF will never be true? If so, how do I detect a 0 match?
cheers for any help
Frank