TDbException

Description

TDbCommand failed to execute the query SQL "SELECT COUNT(*) AS Aantal FROM ratings,users WHERE users.id=ratings.rating_user_id AND rated_user_id=": 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 1

Source File

/opt/lsws/www/www.zoekertjesnet.be/html/prado-3.1.10.r3017/framework/Data/TDbCommand.php (230)

0219:         try
0220:         {
0221:             // Znetframework::trace('Query: '.$this->getDebugStatementText(), 'System.Data');
0222:             if($this->_statement instanceof PDOStatement)
0223:                 $this->_statement->execute();
0224:             else
0225:                 $this->_statement=$this->getConnection()->getPdoInstance()->query($this->getText());
0226:             return new TDbDataReader($this);
0227:         }
0228:         catch(Exception $e)
0229:         {
0230: throw new TDbException('dbcommand_query_failed',$e->getMessage(),$this->getDebugStatementText());
0231: } 0232: } 0233: 0234: /** 0235: * Executes the SQL statement and returns the first row of the result. 0236: * This is a convenient method of {@link query} when only the first row of data is needed. 0237: * @param boolean whether the row should be returned as an associated array with 0238: * column names as the keys or the array keys are column indexes (0-based). 0239: * @return array the first row of the query result, false if no result. 0240: * @throws TDbException execution failed 0241: */ 0242: public function queryRow($fetchAssociative=true)

Stack Trace

#0 /opt/lsws/www/www.zoekertjesnet.be/html/protected/Pages/Profile.php(24): TDbCommand->query()
#1 /opt/lsws/www/www.zoekertjesnet.be/html/protected/Pages/Profile.php(37): Profile->QueryRatings(0, 0, true)
#2 /opt/lsws/www/www.zoekertjesnet.be/html/protected/Pages/Profile.php(63): Profile->GetRatingsCount()
#3 /opt/lsws/www/www.zoekertjesnet.be/html/prado-3.1.10.r3017/framework/pradolite.php(4210): Profile->onLoad(NULL)
#4 /opt/lsws/www/www.zoekertjesnet.be/html/prado-3.1.10.r3017/framework/pradolite.php(6223): TControl->loadRecursive()
#5 /opt/lsws/www/www.zoekertjesnet.be/html/prado-3.1.10.r3017/framework/pradolite.php(6215): TPage->processNormalRequest(Object(THtmlWriter))
#6 /opt/lsws/www/www.zoekertjesnet.be/html/prado-3.1.10.r3017/framework/pradolite.php(8340): TPage->run(Object(THtmlWriter))
#7 /opt/lsws/www/www.zoekertjesnet.be/html/prado-3.1.10.r3017/framework/pradolite.php(8306): TPageService->runPage(Object(Profile), Array)
#8 /opt/lsws/www/www.zoekertjesnet.be/html/prado-3.1.10.r3017/framework/pradolite.php(9297): TPageService->run()
#9 /opt/lsws/www/www.zoekertjesnet.be/html/prado-3.1.10.r3017/framework/pradolite.php(8899): TApplication->runService()
#10 /opt/lsws/www/www.zoekertjesnet.be/html/index.php(20): TApplication->run()
#11 {main}
2018-06-24 20:23 Apache/2.4.7 (Ubuntu) ZNETFRAMEWORK/3.1.10