by wojeh » 22 Jul 2013, 18:19
CDbException
CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Object' in 'field list'. The SQL statement executed was: SELECT Object id #396
FROM `ore_apartment_statistics`
WHERE apartment_id = "34"
/home/wojeh/public_html/framework/db/CDbCommand.php(541)
529 {
530 if($this->_connection->enableProfiling)
531 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
532
533 $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
534 $message=$e->getMessage();
535 Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
536 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
537
538 if(YII_DEBUG)
539 $message.='. The SQL statement executed was: '.$this->getText().$par;
540
541 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
542 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
543 }
544 }
545
546 /**
547 * Builds a SQL SELECT statement from the given query specification.
548 * @param array $query the query specification in name-value pairs. The following
549 * query options are supported: {@link select}, {@link distinct}, {@link from},
550 * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
551 * {@link limit}, {@link offset} and {@link union}.
552 * @return string the SQL statement
553 * @since 1.1.6
Stack Trace
#0
+ /home/wojeh/public_html/framework/db/CDbCommand.php(432): CDbCommand->queryInternal("fetchColumn", 0, array())
#1
– /home/wojeh/public_html/protected/modules/apartments/models/Apartment.php(958): CDbCommand->queryScalar()
953
954 $statistics['all'] = Yii::app()->db->createCommand()
955 ->select(array(new CDbExpression("COUNT(id) AS countAll")))
956 ->from('{{apartment_statistics}}')
957 ->where('apartment_id = "'.$id.'"')
958 ->queryScalar();
959
960 $statistics['today'] = Yii::app()->db->createCommand()
961 ->select(array(new CDbExpression("COUNT(id) AS countToday")))
962 ->from('{{apartment_statistics}}')
963 ->where('apartment_id = "'.$id.'" AND date(date_created)=date(now())')
#2
– /home/wojeh/public_html/protected/modules/apartments/controllers/MainController.php(148): Apartment::getApartmentVisitCount("34")
143 ));
144 } else {
145 $this->render('view', array(
146 'model' => $apartment,
147 'comment' => $comment,
148 'statistics' => Apartment::getApartmentVisitCount($id),
149 ));
150 }
151 }
152
153 public function actionGmap($id, $model = null){
#3
unknown(0): MainController->actionView("34", "", 0)
#4
+ /home/wojeh/public_html/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(MainController, array("34", "", 0))
#5
+ /home/wojeh/public_html/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(MainController, ReflectionMethod, array("id" => "34"))
#6
+ /home/wojeh/public_html/framework/web/CController.php(308): CInlineAction->runWithParams(array("id" => "34"))
#7
+ /home/wojeh/public_html/framework/web/filters/CFilterChain.php(133): CController->runAction(CInlineAction)
#8
+ /home/wojeh/public_html/framework/web/filters/CFilter.php(40): CFilterChain->run()
#9
+ /home/wojeh/public_html/framework/web/CController.php(1145): CFilter->filter(CFilterChain)
#10
+ /home/wojeh/public_html/framework/web/filters/CInlineFilter.php(58): CController->filterAccessControl(CFilterChain)
#11
+ /home/wojeh/public_html/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter(CFilterChain)
#12
+ /home/wojeh/public_html/framework/web/CController.php(291): CFilterChain->run()
#13
+ /home/wojeh/public_html/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array("accessControl"))
#14
+ /home/wojeh/public_html/framework/web/CWebApplication.php(282): CController->run("view")
#15
+ /home/wojeh/public_html/framework/web/CWebApplication.php(141): CWebApplication->runController("apartments/main/view")
#16
+ /home/wojeh/public_html/framework/base/CApplication.php(169): CWebApplication->processRequest()
#17
– /home/wojeh/public_html/index.php(20): CApplication->run()
15
16 define('ALREADY_INSTALL_FILE', ROOT_PATH . DIRECTORY_SEPARATOR . 'protected' . DIRECTORY_SEPARATOR
17 . 'runtime' . DIRECTORY_SEPARATOR . 'already_install');
18
19 require_once($yii);
20 Yii::createWebApplication($config)->run();
2013-07-22 08:18:23 Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_hive/3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 mod_jk/1.2.35 Yii Framework/1.1.13