DB function failed with 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 p.id != 0 ORDER BY RAND() LIMIT 5' at line 1 SQL=SELECT p.*,ph.url,ph.title,l.name FROM poc123986983247561_ops_property AS p LEFT JOIN poc123986983247561_ops_photo AS ph ON p.id=ph.property_id LEFT JOIN poc123986983247561_ops_location AS l ON p.location_id=l.id WHERE p.published=1 AND p.status_id=1 AND default_photo AND location_id= AND p.id != 0 ORDER BY RAND() LIMIT 5
No valid database connection 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 p.id != 0 ORDER BY RAND() LIMIT 5' at line 1 SQL=SELECT p.*,ph.url,ph.title,l.name FROM poc123986983247561_ops_property AS p LEFT JOIN poc123986983247561_ops_photo AS ph ON p.id=ph.property_id LEFT JOIN poc123986983247561_ops_location AS l ON p.location_id=l.id WHERE p.published=1 AND p.status_id=1 AND default_photo AND location_id= AND p.id != 0 ORDER BY RAND() LIMIT 5