CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and thirumoli_id !=0 GROUP BY thirumoli_id' at line 1. The SQL statement executed was: SELECT * FROM `prabhandam_padal` `t` WHERE prabhandam_id = and thirumoli_id !=0 GROUP BY thirumoli_id

/home/sargurusiv/public_html/yii/framework/db/CDbCommand.php(529)

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

Stack Trace

#3
+
 /home/sargurusiv/public_html/protected/views/site/pasuram.php(35): CActiveRecord->findAll(CDbCriteria)
30                     $prabhandam_id =$_GET['prabhandam_id'];
31                     }
32                     $criteria = new CDbCriteria;
33                     $criteria->condition = "prabhandam_id =".$prabhandam_id." and thirumoli_id !=0";
34                     $criteria->group = "thirumoli_id";
35                     $padal = Padal::model()->findAll($criteria); ?>
36                     <div class="pagination7 clearfix">
37                           <a>திருமொழி</a><br />
38                      <?php
39                     foreach($padal as $padals)
40                     { 
#8
+
 /home/sargurusiv/public_html/protected/controllers/SiteController.php(293): CController->render("pasuram", array("thirumoli_id" => null, "thirumoli" => null, "padal" => null, "alwar_id" => null, ...))
288                     
289                     /*$criteria = new CDbCriteria;
290                     $criteria->condition ="  thirumoli_id= ".$thirumoli->thirumoli_id." AND prabhandam_id=".$prabhandam_id;
291                     $padal = Padal::model()->findAll($criteria);*/
292                     $audio = Audio::model()->findByAttributes(array('padal_id'=>$padal->padal_id));
293                     $this->render('pasuram',array('thirumoli_id'=>$thirumoli_id,'thirumoli'=>$thirumoli,'padal'=>$padal,'alwar_id'=>$alwar_id,'alwar'=>$alwar,'prabhandam_id'=>$prabhandam_id,'prabhandam_id'=>$prabhandam_id,'prabhandam'=>$prabhandam,'audio'=>$audio,'from'=>$from,'to'=>$to,'padal_id'=>$padal_id,'thiru_id'=>$thiru_id,'pra_id'=>$pra_id));
294                 }
295                 public function actionMyfav()
296                 {
297                 $user    =    $_GET['username'];
298                 
#16
+
 /home/sargurusiv/public_html/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-28 15:32:53 Apache Yii Framework/1.1.12