Error Info: Array ( [0] => 42S22 [1] => 1054 [2] => Unknown column 'wheel_modification.price_retail = 0' in 'order clause' )
in /var/www/prod/vendor/yiisoft/yii2/db/Command.php at line 1293
$exceptionClass = '\yii\db\Exception'; foreach ($this->exceptionMap as $error => $class) { if (strpos($e->getMessage(), $error) !== false) { $exceptionClass = $class; } } $message = $e->getMessage() . "\nThe SQL being executed was: $rawSql"; $errorInfo = $e instanceof \PDOException ? $e->errorInfo : null; return new $exceptionClass($message, $errorInfo, $e->getCode(), $e); } /** * Returns a value indicating whether a SQL statement is for read purpose. * @param string $sql the SQL statement * @return bool whether a SQL statement is for read purpose. */ public function isReadQuery($sql) {
} else { $this->pdoStatement->execute(); } break; } catch (\Exception $e) { $rawSql = $rawSql ?: $this->getRawSql(); $e = $this->db->getSchema()->convertException($e, $rawSql); if ($this->_retryHandler === null || !call_user_func($this->_retryHandler, $e, $attempt)) { throw $e; } } } }
$this->prepare(true); try { $profile and Yii::beginProfile($rawSql, 'yii\db\Command::query'); $this->internalExecute($rawSql); if ($method === '') { $result = new DataReader($this); } else { if ($fetchMode === null) { $fetchMode = $this->fetchMode;
* @return array all rows of the query result. Each array element is an array representing a row of data. * An empty array is returned if the query results in nothing. * @throws Exception execution failed */ public function queryAll($fetchMode = null) { return $this->queryInternal('fetchAll', $fetchMode); } /** * Executes the SQL statement and returns the first row of the result. * This method is best used when only the first row of result is needed for a query. * @param int $fetchMode the result fetch mode. Please refer to [PHP manual](https://secure.php.net/manual/en/pdostatement.setfetchmode.php)
*/ public function all($db = null) { if ($this->emulateExecution) { return []; } $rows = $this->createCommand($db)->queryAll(); return $this->populate($rows); } /** * Converts the raw query results into the format as specified by this query. * This method is internally used to convert the data fetched from database
* @param Connection $db the DB connection used to create the DB command. * If null, the DB connection returned by [[modelClass]] will be used. * @return array|ActiveRecord[] the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null) { return parent::all($db); } /** * {@inheritdoc} */ public function prepare($builder)
$query->limit($pagination->getLimit())->offset($pagination->getOffset()); } if (($sort = $this->getSort()) !== false) { $query->addOrderBy($sort->getOrders()); } return $query->all($this->db); } /** * {@inheritdoc} */ protected function prepareKeys($models)
* * @param bool $forcePrepare whether to force data preparation even if it has been done before. */ public function prepare($forcePrepare = false) { if ($forcePrepare || $this->_models === null) { $this->_models = $this->prepareModels(); } if ($forcePrepare || $this->_keys === null) { $this->_keys = $this->prepareKeys($this->_models); } }
/** * Returns the data models in the current page. * @return array the list of data models in the current page. */ public function getModels() { $this->prepare(); return $this->_models; } /** * Sets the data models in the current page.
/** * Returns the number of data models in the current page. * @return int the number of data models in the current page. */ public function getCount() { return count($this->getModels()); } /** * Returns the total number of data models. * When [[pagination]] is false, this returns the same value as [[count]]. * Otherwise, it will call [[prepareTotalCount()]] to get the count.
/** * Runs the widget. */ public function run() { if ($this->showOnEmpty || $this->dataProvider->getCount() > 0) { $content = preg_replace_callback('/{\\w+}/', function ($matches) { $content = $this->renderSection($matches[0]); return $content === false ? $matches[0] : $content; }, $this->layout); } else {
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
'class' => 'catalog', ], 'itemView' => '@frontend/modules/wheel/views/search/_item_grid', 'itemOptions' => ['tag' => false], 'summary' => false, 'layout' => '{items}', 'emptyText' => 'Ничего не найдено', ]) ?> </div> <div class="selection-products__block selection-products__pagination catalog__pagination"> <div class="pagination__wrapper"> <?= \frontend\widgets\InfiniteScrollPager::widget([ 'pagination' => $dataProvider->pagination,
{ $_obInitialLevel_ = ob_get_level(); ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); try { require $_file_; return ob_get_clean(); } catch (\Exception $e) { while (ob_get_level() > $_obInitialLevel_) { if (!@ob_end_clean()) { ob_clean(); }
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @throws InvalidCallException if the view cannot be resolved. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the [path alias](guide:concept-aliases) of the view file. Please refer to [[render()]] * on how to specify this parameter.
</div> <?php endif; ?> <div id="discs" class="tabs__body js-tab"> <div class="product-description_bottom"> <div class="main__product-mods grid"> <div class="grid-module-8 selection-tires"> <?= $this->render('_catalog', ['model' => $model]) ?> </div> </div> </div> </div> <?php if($actions):?> <div id="actions" class="tabs__body js-tab">
{ $_obInitialLevel_ = ob_get_level(); ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); try { require $_file_; return ob_get_clean(); } catch (\Exception $e) { while (ob_get_level() > $_obInitialLevel_) { if (!@ob_end_clean()) { ob_clean(); }
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @throws InvalidCallException if the view cannot be resolved. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the [path alias](guide:concept-aliases) of the view file. Please refer to [[render()]] * on how to specify this parameter.
* These parameters will not be available in the layout. * @return string the rendering result. * @throws InvalidArgumentException if the view file or the layout file does not exist. */ public function render($view, $params = []) { $content = $this->getView()->render($view, $params, $this); return $this->renderContent($content); } /** * Renders a static string by applying a layout. * @param string $content the static string being rendered
$this->redirect($model->getUrl(), 301); } Yii::$app->viewed->add($model); return $this->render('view', [ 'model' => $model ]); } }
$args = $this->controller->bindActionParams($this, $params); Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); $application = new yii\web\Application($config); $application->run();
$_GET = [ 'brand_slug' => 'nokian', 'model_slug' => 'hakkapeliitta-cr-van', 'slug' => '215-65-r16-109-107-r', 'sort' => 'price', ]; $_SESSION = [ '__flash' => [], 'viewed-products::list' => [ 'tire' => [ 'tire::54829' => [ 'type' => 'tire', 'id' => 54829, ], ], 'wheel' => [], ], ];