CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'visit' at row 1. The SQL statement executed was: UPDATE `product` SET `id`=:yp0, `productCategoryId`=:yp1, `title`=:yp2, `image`=:yp3, `description`=:yp4, `detail`=:yp5, `sort`=:yp6, `status`=:yp7, `dateCreated`=:yp8, `dateUpdated`=:yp9, `meta_title`=:yp10, `meta_description`=:yp11, `meta_keyword`=:yp12, `type`=:yp13, `price`=:yp14, `price_promotion`=:yp15, `code`=:yp16, `quantity`=:yp17, `position`=:yp18, `box`=:yp19, `href`=:yp20, `domainId`=:yp21, `tags`=:yp22, `visit`=:yp23, `product_include`=:yp24, `made_in`=:yp25, `size`=:yp26, `packing`=:yp27, `support`=:yp28, `policy_delivery`=:yp29, `delivery_information`=:yp30, `customer_review`=:yp31, `genuine_content`=:yp32, `weight`=:yp33, `image2`=:yp34, `image3`=:yp35, `image4`=:yp36, `image5`=:yp37, `video`=:yp38, `logo`=:yp39 WHERE `product`.`id`=1033

/data/www/public_html/hadongsilk/common/lib/framework/db/CDbCommand.php(357)

345         {
346             if($this->_connection->enableProfiling)
347                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
348 
349             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
350             $message=$e->getMessage();
351             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
352                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
353 
354             if(YII_DEBUG)
355                 $message.='. The SQL statement executed was: '.$this->getText().$par;
356 
357             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
358                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
359         }
360     }
361 
362     /**
363      * Executes the SQL statement and returns query result.
364      * This method is for executing an SQL query that returns result set.
365      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
366      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
367      * them in this way can improve the performance. Note that if you pass parameters in this way,
368      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
369      * Please also note that all values are treated as strings in this case, if you need them to be handled as

Stack Trace

#3
+
 /data/www/public_html/hadongsilk/frontend/protected/controllers/ProductController.php(112): CActiveRecord->save()
107     if (!$model) {
108       $this->redirect(array("site/index"));
109     }
110     //Update visit
111     $model->visit = $model->visit+1;
112     $model->save();
113     if(!Yii::app()->Cookies->get('products')){
114       Yii::app()->Cookies->put('products',array($id));
115     }else{
116       if(count(Yii::app()->Cookies->get('products')) >24){
117        // unset(Yii::app()->Cookies->get('products')[23]);
#13
+
 /data/www/public_html/hadongsilk/index.php(18): CApplication->run()
13 
14 require_once($yii);
15 require_once($global);
16 require_once($define);
17 
18 Yii::createWebApplication($config)->run();
2024-03-19 10:03:52 nginx/1.13.9 Yii Framework/1.1.13