CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'wp.index' in 'where clause'. The SQL statement executed was: SELECT wp.country, p.company, count(wp.country) as charter_count
FROM `wwfg_client_pages` `wp`
JOIN `profile` `p` ON p.id = wp.client_pk_id
WHERE wp.country IN ("United States","Canada") AND wp.status = "Published" AND wp.index = "*" AND wp.country != "" AND wp.map_state != "" AND wp.map_city != ""
GROUP BY `wp`.`country`
ORDER BY `wp`.`country` DESC

/var/app/current/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

#1
+
 /var/app/current/protected/api/WwfgApi.php(318): CDbCommand->queryAll()
313                         ->from('wwfg_client_pages wp')
314                         ->join('profile p', 'p.id = wp.client_pk_id')
315                         ->where('wp.country IN ("United States","Canada")  AND wp.status = "Published" AND wp.' . $pageName .' = "*" AND wp.country != "" AND wp.map_state != "" AND wp.map_city != ""')
316                         ->group('wp.country')
317                         ->order('wp.country desc')
318                         ->queryAll();      
319 
320                     $country_list2 = Yii::app()->db->createCommand()
321                         ->select('wp.country, "International" as country, count(wp.country) as charter_count')
322                         ->from('wwfg_client_pages wp')
323                         ->join('profile p', 'p.id = wp.client_pk_id')
#2
+
 /var/app/current/protected/controllers/SiteController.php(748): WwfgApi->getCountryShortcutList("578727", "index", array("pageName" => "index", "param1" => "favicon.ico", "page_type" => "Home", "site" => LiveSite, ...))
743             if($this->pageName == 'onthewater'){
744                //$this->pageName = '_wwfgonthewater';
745             }
746             else{
747                 
748                     $shortcut_country_list = $wwfgApi->getCountryShortcutList(Yii::app()->session['site_profile']->id, $this->pageName, $this->params);
749                     $this->params['shortcut_country_list'] = $shortcut_country_list;            
750 
751                     $country_list = $wwfgApi->getCountryList(Yii::app()->session['site_profile']->id, $this->pageName, $this->params);
752                     $this->params['country_list'] = $country_list;
753 
#9
+
 /var/app/current/protected/modules/rights/components/RController.php(39): CFilter->filter(CFilterChain)
34     public function filterRights($filterChain)
35     {
36           //  Yii::log("***********************************RController::filterRights()",'vardump'); 
37         $filter = new RightsFilter;
38         $filter->allowedActions = $this->allowedActions();
39         $filter->filter($filterChain);
40     }
41 
42     /**
43     * @return string the actions that are always allowed separated by commas.
44     */
2016-01-21 13:19:04 Apache Yii Framework/1.1.15-dev