CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1194 Table 'web_order_view' is marked as crashed and should be repaired. The SQL statement executed was: SELECT COUNT(*) as cnt FROM `web_order_view` `t` WHERE (((product_model=:ycp303) AND (game_id=:ycp304)) AND (site_key=:ycp305)) AND (addtime>:ycp306) LIMIT 1

/data/dhost2/wwwroot/okaymmo/public_html/framework/db/CDbCommand.php(543)

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

Stack Trace

#3
+
 /data/dhost2/wwwroot/okaymmo/public_html/protected/models/WebOrderView.php(149): CActiveRecord->find(CDbCriteria)
144         $cdbc->compare('site_key', Yii::app()->params->site_id);
145         if ($time) {
146             $cdbc->compare('addtime', '>' . date('Y-m-d') . ' 00:00:00');
147         }
148         $cdbc->select = "COUNT(*) as cnt";
149         return $this->find($cdbc)->cnt;
150     }
151 
152     /**
153       +-----------------------------------------------------
154      * 说明 自动添加
#4
+
 /data/dhost2/wwwroot/okaymmo/public_html/themes/okaymmo/views/product/_list_gold_var.php(55): WebOrderView->getOrderViewCnt("3991", "GOLD", "")
50             </div>
51         </form>
52     </div>
53     <?php
54 endforeach;
55 $reCount = WebOrderView::model()->getOrderViewCnt($this->topGame->id, 'GOLD', '');
56 if ($reCount < 5 && $view_name) {
57     WebOrderView::model()->AddOrderView($this->topGame->id, 'Gold', $view_name, '');
58 }
59 ?>
#8
+
 /data/dhost2/wwwroot/okaymmo/public_html/themes/okaymmo/views/product/_list_gold.php(67): CController->renderPartial("_list_gold_var", array("gData" => array(array("num" => "2", "dis" => 1), array("num" => 4, "dis" => 1), array("num" => 6, "dis" => 1), array("num" => 8, "dis" => 1), ...), "zObj" => ProductCategory, "treCount" => "0", "zCount" => 1))
62                                         <div class="clear"></div>
63                                     </div>
64                                 </div>
65                             </form>
66                         </div>
67                         <?php $this->renderPartial('_list_gold_var', array('gData' => $cgData, 'zObj' => $zObj, 'treCount' => $treCount, 'zCount' => $zCount)); ?>
68                     </div>
69                 <?php endif; ?>
70             </div>
71             <div class="clear"></div>
72         </div>
2024-03-19 08:13:54 nginx/1.18.0 Yii Framework/1.1.17