Notice: Trying to get property of non-object in /var/www/ on line 10

Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 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 'order by rand() limit 2' at line 8 in /var/www/ on line 264

Fatal error: Uncaught Error: Call to a member function fetchAll() on boolean in /var/www/ Stack trace: #0 /var/www/ Dao->sql('\r\n\t\t\t\t\tselect \r...') #1 /var/www/ imoveisDao->getInnerImoveisPraia(NULL) #2 {main} thrown in /var/www/ on line 265