Warning (512): SQL Error: 1064: 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 'AND c.start_date >= now() AND c.course_status NOT IN (0) AND c.master_id <> 1' at line 2 [CORE/cake/libs/model/datasources/dbo_source.php, line 666]

Query: SELECT c.id, c.title, c.start_date, c.slug, c.max_capacity, c.tutor_id, t.name, IFNULL(cl.booked,0) as bookedval, IFNULL(c.fully_booked,0) as fully_booked_flag FROM courses c LEFT OUTER JOIN courses_linked cl ON c.id = cl.id LEFT JOIN tutors t ON t.id = c.tutor_id WHERE c.master_id = AND c.start_date >= now() AND c.course_status NOT IN (0) AND c.master_id <> 1

Warning (2): Invalid argument supplied for foreach() [APP/models/course.php, line 136]
Warning: Illegal string offset 'file' in /var/www/html/cake/libs/debugger.php on line 622 Warning: Illegal string offset 'line' in /var/www/html/cake/libs/debugger.php on line 622
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/cake/libs/debugger.php:673) [CORE/cake/libs/controller/controller.php, line 744]