TDbException

Description

TDbCommand failed to execute the query SQL "SELECT t.*, 0 as candelete FROM tbl_contenido t, tbl_sender_contenido sc, tbl_categorias c, tbl_languages l WHERE t.categoria_id = c.id AND c.lenguaje_id = 1 AND c.lenguaje_id = l.id AND l.activo = 1 AND t.id = sc.contenido_id AND c.activo = 1 AND sc.sender_id = 324〈=es ORDER BY `orden` ASC": 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 '=es ORDER BY `orden` ASC' at line 9

Source File

/home/ciencia/public_html/prado/framework/Data/TDbCommand.php (231)

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

Stack Trace

#0 /home/ciencia/public_html/prado/framework/Data/DataGateway/TDataGatewayCommand.php(304): TDbCommand->query()
#1 /home/ciencia/public_html/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(247): TDataGatewayCommand->findAllBySql(Object(TActiveRecordCriteria))
#2 /home/ciencia/public_html/prado/framework/Data/ActiveRecord/TActiveRecord.php(677): TActiveRecordGateway->findRecordsBySql(Object(tbl_contenido), Object(TActiveRecordCriteria))
#3 /home/ciencia/public_html/protected/pages/modules/contenido/public/contenido.php(46): TActiveRecord->findAllBySql('SELECT t.*, 0 a...')
#4 /home/ciencia/public_html/protected/pages/modules/contenido/public/contenido.php(12): contenido->RefreshArticulos()
#5 /home/ciencia/public_html/prado/framework/Web/UI/TControl.php(1279): contenido->onInit(NULL)
#6 /home/ciencia/public_html/prado/framework/Web/UI/TCompositeControl.php(35): TControl->initRecursive(NULL)
#7 /home/ciencia/public_html/prado/framework/Web/UI/TTemplateControl.php(240): TCompositeControl->initRecursive(NULL)
#8 /home/ciencia/public_html/prado/framework/Web/UI/TPage.php(214): TTemplateControl->initRecursive()
#9 /home/ciencia/public_html/prado/framework/Web/UI/TPage.php(203): TPage->processNormalRequest(Object(THtmlWriter))
#10 /home/ciencia/public_html/prado/framework/Web/Services/TPageService.php(524): TPage->run(Object(THtmlWriter))
#11 /home/ciencia/public_html/prado/framework/Web/Services/TPageService.php(470): TPageService->runPage(Object(contenido), Array)
#12 /home/ciencia/public_html/prado/framework/TApplication.php(1189): TPageService->run()
#13 /home/ciencia/public_html/prado/framework/TApplication.php(406): TApplication->runService()
#14 /home/ciencia/public_html/index.php(22): TApplication->run()
#15 {main}
2019-07-17 11:28 Apache/2.2.32 (Unix) mod_ssl/2.2.32 OpenSSL/1.0.1e-fips DAV/2 mod_bwlimited/1.4 PRADO/3.2.1