CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1525 Incorrect DATE value: '2024-29-03'. The SQL statement executed was: SELECT *
FROM `fiy_hotel_tax_settting`
WHERE (((end_to > :dateto) AND (stay_from <=:datefrom)) AND (hotel_id=:hotel_id)) AND (status=:status)

/home/hotelsbi/public_html/yii/framework/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

#1
+
 /home/hotelsbi/public_html/protected/models/FiyHotelTaxSettting.php(119): CDbCommand->queryAll()
114                 ->from('fiy_hotel_tax_settting')
115                 ->andWhere('end_to > :dateto' , array(':dateto' => $dateto ) )
116                 ->andWhere('stay_from <=:datefrom' , array(':datefrom' => $datefrom ) )
117                 ->andWhere('hotel_id=:hotel_id' , array(':hotel_id' => $hotel_id ) )
118                 ->andWhere('status=:status' , array(':status' => 1 ) )
119                 ->queryAll();
120             
121         return $taxinfo;
122             
123         
124         }
#2
+
 /home/hotelsbi/public_html/protected/views/findhotel/myhotel.php(64): FiyHotelTaxSettting->hotelaxinfo("2024-28-03", "2024-29-03", "224")
59 $today = $_REQUEST["from"];
60 $n_date = $_REQUEST["to"];
61 ?>
62  <?php
63         $tax = new FiyHotelTaxSettting;
64         $tax_info = $tax->hotelaxinfo($_SESSION['checkin'], $_SESSION['checkout'], $hotelinfoarr['hotel_id']);
65 
66 
67 
68         Yii::app()->session['hotel_id'] = $hotel_id = $hotelinfoarr['hotel_id'];
69         $promo_type_id = 5;
#7
+
 /home/hotelsbi/public_html/protected/controllers/FindhotelController.php(862): CController->render("/findhotel/myhotel", array("dataProvider" => CActiveDataProvider))
857 $this->layout = 'column2_new';
858         // $this->layout='map';
859 
860         $dataProvider = new CActiveDataProvider('AdminDashboard');
861         $this->render('/findhotel/myhotel', array(
862             'dataProvider' => $dataProvider,
863         ));
864     }
865 
866     public function actionBookingdetails() {
867 
2024-03-28 05:14:48 LiteSpeed Yii Framework/1.1.13