CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rand_link' in 'where clause'. The SQL statement executed was: SELECT * FROM tbl_portcategory WHERE category_name = ''+rand_link+''

/mnt/stor9-wc2-dfw1/463596/463684/www.galaxyweblinks.com/web/content/framework/db/CDbCommand.php(528)

516             return $result;
517         }
518         catch(Exception $e)
519         {
520             if($this->_connection->enableProfiling)
521                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
522             $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
523             $message = $e->getMessage();
524             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
525                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
526             if(YII_DEBUG)
527                 $message .= '. The SQL statement executed was: '.$this->getText().$par;
528             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
529                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
530         }
531     }
532 
533     /**
534      * Builds a SQL SELECT statement from the given query specification.
535      * @param array $query the query specification in name-value pairs. The following
536      * query options are supported: {@link select}, {@link distinct}, {@link from},
537      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
538      * {@link limit}, {@link offset} and {@link union}.
539      * @return string the SQL statement
540      * @since 1.1.6

Stack Trace

#1
+
 /mnt/stor9-wc2-dfw1/463596/463684/www.galaxyweblinks.com/web/content/protected/views/portfolio/seo.php(28): CDbCommand->queryAll()
23                 $checkval=explode('=',$val3);
24                 $val2 = str_replace("index?","",$checkval[0]);
25                 $val2=str_replace('-',' ',$val2);
26                 $sql = "SELECT * FROM tbl_portcategory WHERE category_name = '".$val2."' ";
27                 $command = Yii::app()->db->createCommand($sql);
28                 $result = $command->queryAll();
29                 $resualt = $result[0]['portcategory_id'];
30                 //echo $resualt;exit;
31                 
32             }
33             ?>
#6
+
 /mnt/stor9-wc2-dfw1/463596/463684/www.galaxyweblinks.com/web/content/protected/controllers/PortfolioController.php(2290): CController->render("seo", array("models" => null, "post" => array(Portcategory, Portcategory, Portcategory, Portcategory, ...), "head" => null, "Mmodel" => null, ...))
2285           'head'=>$head,
2286           'Mmodel'=>$Mmodel,
2287           'count'=>$count,
2288           'perpage'=>$perpageLimit,
2289           'currentpage'=>$currentpage
2290           ));
2291     }
2292     
2293     public function actionJson()
2294     {
2295         $this->layout = false;
#19
+
 /mnt/stor9-wc2-dfw1/463596/463684/www.galaxyweblinks.com/web/content/index.php(37): CApplication->run()
32 defined('YII_DEBUG') or define('YII_DEBUG',true);
33 // specify how many levels of call stack should be shown in each log message
34 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
35 
36 require_once($yii);
37 Yii::createWebApplication($config)->run();
38 
39 
40 
41 
2016-12-08 01:51:36 Apache/2.4 Yii Framework/1.1.10