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

Fatal error: Uncaught exception 'PDOException' with message '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 'AND os_creation_date LIKE "2018-07-17%"' at line 1' in /var/www/vhosts/ Stack trace: #0 /var/www/vhosts/ PDO->query('SELECT os_id FR...') #1 /var/www/vhosts/ vetm::addVisitaToOfferDB(NULL) #2 {main} thrown in /var/www/vhosts/ on line 393