CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined

/home/a/artviva/svadebniysunduchok.ru/public_html/yii_1.1.6/db/CDbCommand.php(471)

459 
460             if($this->_connection->enableProfiling)
461                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
462 
463             return $result;
464         }
465         catch(Exception $e)
466         {
467             if($this->_connection->enableProfiling)
468                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
469             Yii::log('Error in querying SQL: '.$this->getText().$par,CLogger::LEVEL_ERROR,'system.db.CDbCommand');
470             $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
471             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
472                 array('{error}'=>$e->getMessage())),(int)$e->getCode(),$errorInfo);
473         }
474     }
475 
476     /**
477      * Builds a SQL SELECT statement from the given query specification.
478      * @param array $query the query specification in name-value pairs. The following
479      * query options are supported: {@link select}, {@link distinct}, {@link from},
480      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
481      * {@link limit}, {@link offset} and {@link union}.
482      * @return string the SQL statement
483      * @since 1.1.6

Stack Trace

#6
+
 /home/a/artviva/svadebniysunduchok.ru/public_html/protected/modules/shop/controllers/DefaultController.php(162): CActiveRecord->findAll(CDbCriteria)
157                     'stock',
158                     'stock.info'
159                 ),
160             ));
161         }
162         $list = ShopItems::model()->findAll($c_list);
163         /*$sname = Y::request()->getQuery('sname');
164         if($sname == '') {
165             $sname = 'winter';
166         }
167         $category = ShopCatalog::model()->find('sname=?', array($sname));*/
#17
+
 /home/a/artviva/svadebniysunduchok.ru/public_html/index.php(18): CApplication->run()
13 
14 header("Content-type: text/html; charset=UTF-8");
15 
16 require_once($globals);
17 require_once($yii);
18 Yii::createWebApplication($config)->run();
2024-03-28 12:38:54 Apache/2.4.29 Yii Framework/1.1.6