TDbCommand failed to execute the query SQL "(SELECT * FROM fotos WHERE producto=www.mipasteleria.com AND portada='1') UNION (SELECT * FROM fotos WHERE producto=www.mipasteleria.com AND portada='0')": SQLSTATE[42S22]: Column not found: 1054 Unknown column 'www.mipasteleria.com' in 'where clause'
/home/www.mipasteleria.com/www/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)
#0 /home/www.mipasteleria.com/www/prado/framework/Data/DataGateway/TDataGatewayCommand.php(304): TDbCommand->query()
#1 /home/www.mipasteleria.com/www/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(247): TDataGatewayCommand->findAllBySql(Object(TActiveRecordCriteria))
#2 /home/www.mipasteleria.com/www/prado/framework/Data/ActiveRecord/TActiveRecord.php(677): TActiveRecordGateway->findRecordsBySql(Object(FotoRecord), Object(TActiveRecordCriteria))
#3 /home/www.mipasteleria.com/www/protected/data/FotoRecord.php(48): TActiveRecord->findAllBySql('(SELECT * ????...')
#4 /home/www.mipasteleria.com/www/protected/pages/Tienda/Catalogo/Productos/Detalle.php(86): FotoRecord::listAllByGallery('www.mipasteleri...')
#5 /home/www.mipasteleria.com/www/protected/pages/Tienda/Catalogo/Productos/Detalle.php(43): Detalle->loadFotos()
#6 /home/www.mipasteleria.com/www/prado/framework/Web/UI/TControl.php(1295): Detalle->onLoad(NULL)
#7 /home/www.mipasteleria.com/www/prado/framework/Web/UI/TPage.php(222): TControl->loadRecursive()
#8 /home/www.mipasteleria.com/www/prado/framework/Web/UI/TPage.php(203): TPage->processNormalRequest(Object(THtmlWriter))
#9 /home/www.mipasteleria.com/www/prado/framework/Web/Services/TPageService.php(524): TPage->run(Object(THtmlWriter))
#10 /home/www.mipasteleria.com/www/prado/framework/Web/Services/TPageService.php(470): TPageService->runPage(Object(Detalle), Array)
#11 /home/www.mipasteleria.com/www/prado/framework/TApplication.php(1189): TPageService->run()
#12 /home/www.mipasteleria.com/www/prado/framework/TApplication.php(406): TApplication->runService()
#13 /home/www.mipasteleria.com/www/index.php(24): TApplication->run()
#14 {main}