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 's National League Division One SE'' at line 1 )
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; }
//echo "sending mail $to from" . Yii::$app->params['adminEmail']; return $mail->send(); } public static function runQuery($sql, $function = 'queryAll') { $connection = \Yii::$app->getDb(); return $connection->createCommand($sql)->$function(); } public static function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale) { list($imagewidth, $imageheight, $imageType) = getimagesize($image); $imageType = image_type_to_mime_type($imageType);
\Yii::$app->session['market_id'] = $_GET['market_id']; } if (isset($_GET['league_uri'])){ $_GET['hiddenfield'] = 1; $_GET['country_id'] = Utils::runQuery("SELECT id FROM " . Fixtures::$tableprefix . "_countries WHERE name LIKE '".$_GET['country_uri']."'", 'queryScalar'); $_GET['league_id'] = [Utils::runQuery("SELECT id FROM " . Fixtures::$tableprefix . "_leagues WHERE country_id = ".$_GET['country_id']." AND name LIKE '".Utils::uri2Name($_GET['league_uri'])."'", 'queryScalar')]; if (isset($_GET['country_uri'])){ $_GET['country_id'] = Utils::runQuery("SELECT id FROM " . Fixtures::$tableprefix . "_countries WHERE name LIKE '".$_GET['country_uri']."'", 'queryScalar'); } }
*/ public function __construct($config = []) { if (!empty($config)) { Yii::configure($this, $config); } $this->init(); } /** * Initializes the object. * This method is invoked at the end of the constructor after the object is initialized with the * given configuration.
* @param array $config name-value pairs that will be used to initialize the object properties. */ public function __construct($id, $module, $config = []) { $this->id = $id; $this->module = $module; parent::__construct($config); } /** * {@inheritdoc} * @since 2.0.36 */
$dependencies = $this->resolveDependencies($dependencies, $reflection); if (!$reflection->isInstantiable()) { throw new NotInstantiableException($reflection->name); } if (empty($config)) { return $reflection->newInstanceArgs($dependencies); } $config = $this->resolveDependencies($config); if (!empty($dependencies) && $reflection->implementsInterface('yii\base\Configurable')) { // set $config as the last parameter (existing one will be overwritten)
$class = $class->id; } if (isset($this->_singletons[$class])) { // singleton return $this->_singletons[$class]; } elseif (!isset($this->_definitions[$class])) { return $this->build($class, $params, $config); } $definition = $this->_definitions[$class]; if (is_callable($definition, true)) { $params = $this->resolveDependencies($this->mergeParams($class, $params));
* @throws InvalidConfigException if the configuration is invalid. * @see \yii\di\Container */ public static function createObject($type, array $params = []) { if (is_string($type)) { return static::$container->get($type, $params); } if (is_callable($type, true)) { return static::$container->invoke($type, $params); }
$className = ltrim($this->controllerNamespace . '\\' . str_replace('/', '\\', $prefix) . $className, '\\'); if (strpos($className, '-') !== false || !class_exists($className)) { return null; } if (is_subclass_of($className, 'yii\base\Controller')) { $controller = Yii::createObject($className, [$id, $this]); return get_class($controller) === $className ? $controller : null; } elseif (YII_DEBUG) { throw new InvalidConfigException('Controller class must extend from \\yii\\base\\Controller.'); } return null;
if (($pos = strrpos($route, '/')) !== false) { $id .= '/' . substr($route, 0, $pos); $route = substr($route, $pos + 1); } $controller = $this->createControllerByID($id); if ($controller === null && $route !== '') { $controller = $this->createControllerByID($id . '/' . $route); $route = ''; } return $controller === null ? false : [$controller, $route];
* @param array $params the parameters to be passed to the action * @return mixed the result of the action. * @throws InvalidRouteException if the requested route cannot be resolved into an action successfully. */ public function runAction($route, $params = []) { $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);
$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' => 'England', 'league_uri' => 'Women\'s-National-League-Division-One-SE', 'hiddenfield' => 1, 'country_id' => '462', ]; $_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:{}}'), ];