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 photos.owner_type = 'venue_logo'' at line 3
SELECT photos.id, data, size, content_type, filename, owner_type FROM photos, db_files WHERE photos.db_file_id = db_files.id AND photos.owner_id = AND photos.owner_type = 'venue_logo'