Error Info: Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') sm_teams_seasons_scenariodata ON team_seasons_id = sm_teams_seasons.id WHERE (' at line 2 )
in /home/wettopa-betmaster/domains/betmaster.wettopa-betmaster.de/public_html/vendor/yiisoft/yii2/db/Command.php at line 1302
$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 string|int|null|false the value of the first column in the first row of the query result. * False is returned if there is no value. * @throws Exception execution failed */ public function queryScalar() { $result = $this->queryInternal('fetchColumn', 0); if (is_resource($result) && get_resource_type($result) === 'stream') { return stream_get_contents($result); } return $result; }
$this->offset = $offset; if ($e !== null) { throw $e; } return $command->queryScalar(); } $command = (new self()) ->select([$selectExpression]) ->from(['c' => $this]) ->createCommand($db);
$modelClass = $this->modelClass; if ($db === null) { $db = $modelClass::getDb(); } if ($this->sql === null) { return parent::queryScalar($selectExpression, $db); } $command = (new Query())->select([$selectExpression]) ->from(['c' => "({$this->sql})"]) ->params($this->params) ->createCommand($db);
public function count($q = '*', $db = null) { if ($this->emulateExecution) { return 0; } return $this->queryScalar("COUNT($q)", $db); } /** * Returns the sum of the specified column values. * @param string $q the column name or expression. * Make sure you properly [quote](guide:db-dao#quoting-table-and-column-names) column names in the expression.
protected function prepareTotalCount() { if (!$this->query instanceof QueryInterface) { throw new InvalidConfigException('The "query" property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses.'); } $query = clone $this->query; return (int) $query->limit(-1)->offset(-1)->orderBy([])->count('*', $this->db); } /** * {@inheritdoc} */ public function setSort($value)
*/ public function getTotalCount() { if ($this->getPagination() === false) { return $this->getCount(); } elseif ($this->_totalCount === null) { $this->_totalCount = $this->prepareTotalCount(); } return $this->_totalCount; } /**
{ if (!$this->query instanceof QueryInterface) { throw new InvalidConfigException('The "query" property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses.'); } $query = clone $this->query; if (($pagination = $this->getPagination()) !== false) { $pagination->totalCount = $this->getTotalCount(); if ($pagination->totalCount === 0) { return []; } $query->limit($pagination->getLimit())->offset($pagination->getOffset()); } if (($sort = $this->getSort()) !== false) {
* * @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.
->andFilterWhere(['like', 'twitter', $this->twitter]) ->andFilterWhere(['like', 'logo_path', $this->logo_path]); } if ($this->season_id) { $_GET['season_id'] = $this->season_id; if ($dataProvider->getCount() < 10 && false) { $season_id = $this->season_id; $season = Seasons::findOne($season_id); if (!$season) { echo "get season"; exit; $tmp = \app\models\Utils::callSportmonks('seasons/' . $season_id);
$_POST['TeamsSearch']['country_id'] = $season->league->country_id; $_POST['TeamsSearch']['continent_name'] = $season->league->country->extra_continent; } } } $dataProvider = $searchModel->search($_REQUEST); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
$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__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php'; $config = require __DIR__ . '/../config/web.php'; (new yii\web\Application($config))->run();
$_GET = [ 'country_uri' => 'USA', 'league_uri' => 'NPSL-Members-Cup', 'hiddenfield' => 1, 'country_id' => '3483', 'league_id' => [ '1897', ], 'season_id' => 17251, ]; $_SESSION = [ '__flash' => [], 'frontendTranslation_EnableTranslate' => 1, 'sporttype_id' => 1, 'sporttype' => unserialize('O:21:"app\\models\\Sporttypes":10:{s:36:"' . "\0" . 'yii\\db\\BaseActiveRecord' . "\0" . '_attributes";a:18:{s:2:"id";i:1;s:4:"name";s:8:"Football";s:11:"tableprefix";s:2:"sm";s:4:"icon";s:6:"futbol";s:6:"active";i:1;s:7:"hitname";s:4:"goal";s:8:"has_draw";i:1;s:15:"stats_available";i:1;s:15:"squad_available";i:1;s:15:"sm_ai_available";i:1;s:15:"game_length_min";i:90;s:7:"periods";i:2;s:15:"overtimes_count";i:0;s:19:"overtime_length_min";i:0;s:9:"penalties";i:0;s:10:"win_points";i:3;s:11:"draw_points";i:1;s:11:"loss_points";i:0;}s:39:"' . "\0" . 'yii\\db\\BaseActiveRecord' . "\0" . '_oldAttributes";a:18:{s:2:"id";i:1;s:4:"name";s:8:"Football";s:11:"tableprefix";s:2:"sm";s:4:"icon";s:6:"futbol";s:6:"active";i:1;s:7:"hitname";s:4:"goal";s:8:"has_draw";i:1;s:15:"stats_available";i:1;s:15:"squad_available";i:1;s:15:"sm_ai_available";i:1;s:15:"game_length_min";i:90;s:7:"periods";i:2;s:15:"overtimes_count";i:0;s:19:"overtime_length_min";i:0;s:9:"penalties";i:0;s:10:"win_points";i:3;s:11:"draw_points";i:1;s:11:"loss_points";i:0;}s:33:"' . "\0" . 'yii\\db\\BaseActiveRecord' . "\0" . '_related";a:0:{}s:47:"' . "\0" . 'yii\\db\\BaseActiveRecord' . "\0" . '_relationsDependencies";a:0:{}s:23:"' . "\0" . 'yii\\base\\Model' . "\0" . '_errors";N;s:27:"' . "\0" . 'yii\\base\\Model' . "\0" . '_validators";N;s:25:"' . "\0" . 'yii\\base\\Model' . "\0" . '_scenario";s:7:"default";s:27:"' . "\0" . 'yii\\base\\Component' . "\0" . '_events";a:0:{}s:35:"' . "\0" . 'yii\\base\\Component' . "\0" . '_eventWildcards";a:0:{}s:30:"' . "\0" . 'yii\\base\\Component' . "\0" . '_behaviors";a:0:{}}'), ];