Fatal error: Problem preparing query (select tc.course_id from tutor_course as tc LEFT JOIN tutor as tu on(tc.tutor_id=tu.tutor_id) LEFT JOIN course_batch as cb on(cb.course_id=tc.course_id) where tc.tutor_id = '' href '' and tc.status = 'active' and cb.status = 'active' and cb.offer_end_date >= CURDATE() GROUP BY tc.course_id ORDER BY tc.course_id DESC) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'href '' and tc.status = 'active' and cb.status = 'active' and cb.offer_end_date ' at line 1 in /home/knowyjdx/public_html/classes/class.db.php on line 767