Error prepping statement : Unknown column 'subject_shortcode' in 'where clause' -- SELECT distinct(courses.ippcode), urltitle, courses.title, fullTime, partTime, postGrad, underGrad, researchDegree, courses.year, MATCH (courses.title) AGAINST (? IN NATURAL LANGUAGE MODE) as relevance, MATCH (courses.title) AGAINST (? IN BOOLEAN MODE) as exactmatch, courses.title like ? as startmatch FROM courses LEFT JOIN projects on projects.ippcode = courses.ippcode WHERE courses.year = ? AND ( 1=0 OR 1 = 1 ) AND subject_shortcode = ? AND ( ( ( ( ( MONTH(NOW()) < 10 AND MONTH(NOW()) > 8 ) OR ( MONTH(NOW()) = 10 AND DAYOFMONTH(NOW()) < 16 ) ) AND YEAR(NOW()) = YEAR(courses.StartDate) ) OR StartDate > CURDATE()) OR shortCourse = '1' ) ORDER BY startmatch DESC, exactmatch DESC, relevance DESC, title