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 '' at line 7' in /home/kvartyroom/production/piFramework/engine/lib/sql/piDbConnection.php:95 Stack trace: #0 /home/kvartyroom/production/piFramework/engine/lib/sql/piDbConnection.php(95): PDO->query('SELECT\n\nid\n\nFRO...') #1 /home/kvartyroom/production/piFramework/engine/lib/sql/piModel.php(373): piDbConnection->query('SELECT\n\nid\n\nFRO...') #2 /home/kvartyroom/production/piFramework/engine/lib/sql/piModel.php(121): piModel->select('scalar', Object(piSQLStrategy), false) #3 /home/kvartyroom/production/piFramework/engine/lib/sql/piModel.php(66): piModel->selectOneOrScalar(Object(piSQLStrategy), false, 'scalar') #4 /home/kvartyroom/production/piApp/model/mCompaniesTop.php(38): piModel->selectScalar(Object(piSQLStrategy)) #5 /home/kvartyroom/production/piApp/controller/com in /home/kvartyroom/production/piFramework/engine/lib/sql/piDbConnection.php on line 95