Commit fc6d96bc authored by Brett Bieber's avatar Brett Bieber
Browse files

Ensure courses with undergrad crosslistings are also returned

improve readability
parent 3fa8f8a3
......@@ -4,7 +4,16 @@ class UNL_Catalog_CourseSearch_DBSearcher extends UNL_UndergraduateBulletin_Cour
function getQueryResult($query, $offset = 0, $limit = -1)
{
$query = 'SELECT DISTINCT courses.id, courses.xml FROM courses INNER JOIN crosslistings c1 ON courses.id=c1.course_id INNER JOIN crosslistings ON courses.id=crosslistings.course_id WHERE c1.courseNumber >= "500" AND c1.courseNumber != crosslistings.courseNumber AND (' . $query . ');';
$query = 'SELECT DISTINCT courses.id, courses.xml
FROM courses
INNER JOIN crosslistings ON courses.id=crosslistings.course_id
INNER JOIN crosslistings c1 ON courses.id=c1.course_id
WHERE
c1.courseNumber >= "500" AND
(' . $query . ');';
return new UNL_UndergraduateBulletin_CourseSearch_DBSearchResults($query, $offset, $limit);
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment