TDbCommand failed to execute the query SQL "SELECT * FROM `products` WHERE ID = LIMIT 1": 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 'LIMIT 1' at line 1
/home/users/h837549/public_html/romavi/framework/Data/TDbCommand.php (258)
0247: // Prado::trace('Query Row: '.$this->getDebugStatementText(), 'System.Data');
0248: if($this->_statement instanceof PDOStatement)
0249: $this->_statement->execute();
0250: else
0251: $this->_statement=$this->getConnection()->getPdoInstance()->query($this->getText());
0252: $result=$this->_statement->fetch($fetchAssociative ? PDO::FETCH_ASSOC : PDO::FETCH_NUM);
0253: $this->_statement->closeCursor();
0254: return $result;
0255: }
0256: catch(Exception $e)
0257: {
0258: throw new TDbException('dbcommand_query_failed',$e->getMessage(),$this->getDebugStatementText());
0259: }
0260: }
0261:
0262: /**
0263: * Executes the SQL statement and returns the value of the first column in the first row of data.
0264: * This is a convenient method of {@link query} when only a single scalar
0265: * value is needed (e.g. obtaining the count of the records).
0266: * @return mixed the value of the first column in the first row of the query result. False is returned if there is no value.
0267: * @throws TDbException execution failed
0268: */
0269: public function queryScalar()
0270: {
#0 /home/users/h837549/public_html/romavi/framework/Data/DataGateway/TDataGatewayCommand.php(123): TDbCommand->queryRow()
#1 /home/users/h837549/public_html/romavi/framework/Data/ActiveRecord/TActiveRecordGateway.php(225): TDataGatewayCommand->find(Object(TActiveRecordCriteria))
#2 /home/users/h837549/public_html/romavi/framework/Data/ActiveRecord/TActiveRecord.php(583): TActiveRecordGateway->findRecordsByCriteria(Object(ProductRecord), Object(TActiveRecordCriteria))
#3 /home/users/h837549/public_html/romavi/protected/Common/Discount.php(15): TActiveRecord->find(Object(TActiveRecordCriteria))
#4 /home/users/h837549/public_html/romavi/protected/pages/products/detailsproduct.php(222): Discount->getPriceDiscount(NULL)
#5 /home/users/h837549/public_html/romavi/framework/Web/UI/TControl.php(1279): detailsproduct->onInit(NULL)
#6 /home/users/h837549/public_html/romavi/framework/Web/UI/TCompositeControl.php(35): TControl->initRecursive(NULL)
#7 /home/users/h837549/public_html/romavi/framework/Web/UI/TTemplateControl.php(240): TCompositeControl->initRecursive(NULL)
#8 /home/users/h837549/public_html/romavi/framework/Web/UI/TPage.php(214): TTemplateControl->initRecursive()
#9 /home/users/h837549/public_html/romavi/framework/Web/UI/TPage.php(203): TPage->processNormalRequest(Object(THtmlWriter))
#10 /home/users/h837549/public_html/romavi/framework/Web/Services/TPageService.php(524): TPage->run(Object(THtmlWriter))
#11 /home/users/h837549/public_html/romavi/framework/Web/Services/TPageService.php(470): TPageService->runPage(Object(detailsproduct), Array)
#12 /home/users/h837549/public_html/romavi/framework/TApplication.php(1183): TPageService->run()
#13 /home/users/h837549/public_html/romavi/framework/TApplication.php(406): TApplication->runService()
#14 /home/users/h837549/public_html/romavi/index.php(21): TApplication->run()
#15 {main}