CDbException

CDbCommand falló al ejecutar la sentencia SQL: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3. The SQL statement executed was: SELECT *
FROM `galeria` `g`, `foto` `f`
WHERE f.foto_galeria = g.galeria_id AND g.galeria_id IN ()

/opt/bitnami/apps/legacy.lomastravel.com.mx/htdocs/lib/yii/db/CDbCommand.php(516)

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

Stack Trace

#1
+
 /opt/bitnami/apps/legacy.lomastravel.com.mx/htdocs/inc/controllers/ToursController.php(85): CDbCommand->queryAll()
80 
81             ->from('galeria g, foto f')
82 
83             ->where('f.foto_galeria = g.galeria_id AND g.galeria_id IN ('.implode(',', $galeriaList).')')
84 
85             ->queryAll();
86 
87 
88 
89         $_categorias     = array();
90 
#9
+
 /opt/bitnami/apps/legacy.lomastravel.com.mx/htdocs/index.php(28): CApplication->run()
23     require_once($Yii);
24     ini_set("output_buffering",0);
25     ini_set("output_handler",null);
26     ini_set("implicit_flush",0);
27         
28     Yii::createWebApplication($Config)->run();
29         
30     /*
31     Yii::app()->onEndRequest = function($event){
32         return ob_end_flush();
33     };
2024-03-28 17:06:09 Apache Yii Framework/1.1.8