A Database Error Occurred

Error Number: 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 locations_typeid = 1 AND locations_published = 1 AND deleted = 0 OR locati' at line 3

SELECT * FROM (`bf_locations`) WHERE `locations_area` = AND locations_typeid = 1 AND locations_published = 1 AND deleted = 0 OR locations_areafixed = AND locations_typeid = 1 AND locations_published = 1 AND deleted = 0 ORDER BY locations_rank DESC LIMIT 5

Filename: /home/phslive/public_html/core/MY_Model.php

Line Number: 191