CDbException

CDbCommand falhou ao executar o comando SQL: SQLSTATE[HY000]: General error: 1525 Incorrect DATETIME value: ''. The SQL statement executed was: SELECT * FROM `banner` `t` WHERE (((habilitar = 1) AND (local='inicial')) AND (data_entrada <= '2024-05-05 12:38:44')) AND (data_saida IS NULL OR data_saida = '' OR data_saida = '0000-00-00 00:00:00' OR data_saida >= '2024-05-05 12:38:44') ORDER BY data desc

/home/qualitti/public_html/extranet/yii/db/CDbCommand.php(541)

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

Stack Trace

#3
+
 /home/qualitti/public_html/inicial.php(13): CActiveRecord->findAll(CDbCriteria)
08 $c_banner->addCondition("habilitar = 1");
09 $c_banner->addCondition("local='inicial'");
10 $c_banner->addCondition("data_entrada <= '" . $data_atual . "'");
11 $c_banner->addCondition("data_saida IS NULL OR data_saida = '' OR data_saida = '0000-00-00 00:00:00' OR data_saida >= '" . $data_atual . "'");
12 $c_banner->order = "data desc";
13 $banners = Banner::model()->findAll($c_banner);
14 
15 $criteria_destaque = new CDbCriteria();
16 $criteria_destaque->addCondition("habilitar = '1'");
17 $criteria_destaque->addCondition("destaque = '1'");
18 $criteria_destaque->order = 'rand()';
#4
+
 /home/qualitti/public_html/RequestManager.php(171): require_once("/home/qualitti/public_html/inicial.php")
166             Utf8::encode($html);
167             echo $html;
168             exit;
169         }
170 
171         require_once($require_file);
172         exit;
173 
174     }
175 
176 }
#5
+
 /home/qualitti/public_html/index.php(44): RequestManager->run(array("/" => "inicial.php", "/index" => "inicial.php", "/inicial" => "inicial.php", "/sobre" => "sobre.php", ...))
39 
40     '/contato'=>'contato_form.php',
41     '/contato/(?P<sucesso>\w+)'=>'contato_form.php',
42     '/pagina/(?P<id>\d+)'=>'pagina.php',
43 );
44 $request_manager->run($rotas);
45 ?>
2024-05-05 12:38:44 Apache Yii Framework/1.1.13