CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'extra_int_id' in 'where clause'. The SQL statement executed was: SELECT `extras`.`id` AS `t1_c0`, `extras`.`name_ru` AS `t1_c1`, `extras`.`name_en` AS `t1_c2`, `extras`.`building` AS `t1_c3`, `extras`.`image_src` AS `t1_c4`, `extras`.`order` AS `t1_c5` FROM `extra` `extras` INNER JOIN `extra_to_offer` `extras_extras` ON (`extras_extras`.`offer_id`=:ypl0) AND (`extras`.`id`=`extras_extras`.`extra_id`) WHERE (extra_int_id is not null) ORDER BY `order` asc. Bound with :ypl0='4680'

/home7/ppropert/public_html/ppbg.info/framework/db/CDbCommand.php(543)

531         {
532             if($this->_connection->enableProfiling)
533                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534 
535             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536             $message=$e->getMessage();
537             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539 
540             if(YII_DEBUG)
541                 $message.='. The SQL statement executed was: '.$this->getText().$par;
542 
543             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545         }
546     }
547 
548     /**
549      * Builds a SQL SELECT statement from the given query specification.
550      * @param array $query the query specification in name-value pairs. The following
551      * query options are supported: {@link select}, {@link distinct}, {@link from},
552      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553      * {@link limit}, {@link offset} and {@link union}.
554      * @throws CDbException if "from" key is not present in given query parameter
555      * @return string the SQL statement

Stack Trace

#6
+
 /home7/ppropert/public_html/ppbg.info/protected/controllers/OfferController.php(650): CActiveRecord->__call("extras", array(array("condition" => "extra_int_id is not null")))
645         else
646             {
647               if (isset($_GET['print']))
648               {
649                   $wworker=WorkerInt::model()->findAllByAttributes(array('id'=>array(1, 3)));
650                   $extras=$offer->extras(array('condition'=>'extra_int_id is not null'));
651                   $this->renderPartial('printoffer',compact('offer','wworker'));
652                 exit;
653               }
654             }
655 
#7
+
 /home7/ppropert/public_html/ppbg.info/protected/controllers/OfferController.php(650): Offer->extras(array("condition" => "extra_int_id is not null"))
645         else
646             {
647               if (isset($_GET['print']))
648               {
649                   $wworker=WorkerInt::model()->findAllByAttributes(array('id'=>array(1, 3)));
650                   $extras=$offer->extras(array('condition'=>'extra_int_id is not null'));
651                   $this->renderPartial('printoffer',compact('offer','wworker'));
652                 exit;
653               }
654             }
655 
#22
+
 /home7/ppropert/public_html/ppbg.info/index.php(15): CApplication->run()
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 // specify how many levels of call stack should be shown in each log message
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
2024-03-19 07:52:52 Apache Yii Framework/1.1.15-dev