A PHP Error was encountered

Severity: Notice

Message: Undefined index: category_id

Filename: controllers/films.php

Line Number: 65

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/films.php

Line Number: 66

Films

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: category_id

Filename: films/category.php

Line Number: 31

Database Error

An Error Was Encountered

Error Number:

ERROR: parser: parse error at or near "AND" at character 1266

SELECT f.id, f.uri, f.name, f.director, f.publish_date, f.summary, f.description, f.additional_info, f.certificate_note, f.duration_note, f.assistive_note, f."cast", f.country_note, f.format_note, f.year_note, f.language_note, f.published, f.featured, f.comment_text, f.comment_source, f.comment_link, f.commented, f.location_id, f.booking_id, ( SELECT MIN(date) FROM film_screenings WHERE film_id = f.id ) AS mindate, ( SELECT MAX(date) FROM film_screenings WHERE film_id = f.id ) AS maxdate, c.published FROM films f INNER JOIN film_screenings fs ON fs.film_id = f.id AND fs.date >= (SELECT CURRENT_DATE) INNER JOIN categories_films cf ON cf.film_id = f.id INNER JOIN categories c ON c.id = cf.category_id WHERE f.published = TRUE AND c.published = TRUE AND cf.category_id = AND f.publish_date <= '20140729182053' GROUP BY f.id, f.uri, f.name, f.director, f.publish_date, f.summary, f.description, f.additional_info, f.certificate_note, f.duration_note, f.assistive_note, f."cast", f.country_note, f.format_note, f.year_note, f.language_note, f.published, f.featured, f.comment_text, f.comment_source, f.comment_link, f.commented, f.location_id, f.booking_id, c.published ORDER BY mindate ASC, maxdate ASC, f.name ASC;