CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared. The SQL statement executed was: SELECT * FROM `tbl_orders` `t` WHERE (user_session_id=:ycp39) AND (state=:ycp40) LIMIT 1. Bound with :ycp39='4d65c627567b2400958e65f745d8e626', :ycp40='0'

/home/u45289/koncept-light.ru/www/protected/modules/shop/components/ShopCart.php(120)

108      */
109     public function getAmount()
110     {
111         return $this->order->orderItemsAmount + 0;
112     }
113 
114     /**
115      * @param bool $detail
116      * @return int
117      */
118     public function getCount($detail = false)
119     {
120         return $detail ? $this->order->orderItemsDetailCount + 0 : $this->order->orderItemsCount + 0;
121     }
122 
123     /**
124      * @return array
125      */
126     public function getStat()
127     {
128         return array(
129             'amount' => number_format($this->getAmount(), 2, ',', ' '),
130             'count' => $this->getCount(),
131             'detailCount' => $this->getCount(true),
132         );

Stack Trace

#3
+
 /home/u45289/koncept-light.ru/www/protected/modules/shop/components/ShopCart.php(179): CActiveRecord->find(CDbCriteria)
174             } else {
175                 $criteria = new CDbCriteria();
176                 $criteria->compare('user_session_id', (!empty(Yii::app()->params['robo_session'])) ? Yii::app()->params['robo_session'] : Yii::app()->session->sessionID);
177                 $criteria->compare('state', Order::STATE_TMP);
178                 /** @var Order $order */
179                 $order = Order::model()->find($criteria);
180             }
181             if (empty($order) && $createIfNull) {
182                 $order = new Order();
183                 if (!Yii::app()->user->isGuest || !empty(Yii::app()->params['robo_user_id'])) {
184                     if (!empty(Yii::app()->params['robo_user_id'])){
#5
+
 /home/u45289/koncept-light.ru/www/protected/modules/shop/components/ShopCart.php(120): CComponent->__get("order")
115      * @param bool $detail
116      * @return int
117      */
118     public function getCount($detail = false)
119     {
120         return $detail ? $this->order->orderItemsDetailCount + 0 : $this->order->orderItemsCount + 0;
121     }
122 
123     /**
124      * @return array
125      */
#7
+
 /home/u45289/koncept-light.ru/www/themes/shop1proplus/views/ShopCartWidget/default.php(21): CComponent->__get("count")
16         ?>
17     </div>
18     <div class="span9 shop-cart-container" ng-controller="ShopCartWidget">
19         <p>
20             <span>Товаров:&nbsp;</span>
21             <strong ng-init="cartCount = '<?php echo Yii::app()->cart->count; ?>'" ng-bind-html="cartCount"></strong>
22             <br/>
23             <span>На сумму:&nbsp;</span>
24             <strong ng-init="cartAmount = '<?php echo number_format(Yii::app()->cart->amount, 2, ',', ' '); ?>'" ng-bind-html="cartAmount"></strong>
25             <strong>&nbsp;руб.</strong>
26         </p>
2018-10-16 05:35:52 Apache/2.2.22 (Debian) Yii Framework/1.1.15