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 ') AND programs.start_date >= DATE_ADD(NOW(), INTERVAL -1 DAY)' at line 1 )
in /home/signuptraining/public_html/front/vendor/yiisoft/yii2/db/Command.php at line 900
$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, (int) $e->getCode(), $e); } /** * Returns a value indicating whether a SQL statement is for read purpose. * @param string $sql the SQL statement * @return boolean whether a SQL statement is for read purpose. */ public function isReadQuery($sql) {
$this->pdoStatement->closeCursor(); } Yii::endProfile($token, 'yii\db\Command::query'); } catch (\Exception $e) { Yii::endProfile($token, 'yii\db\Command::query'); throw $this->db->getSchema()->convertException($e, $rawSql); } if (isset($cache, $cacheKey, $info)) { $cache->set($cacheKey, [$result], $info[1], $info[2]); Yii::trace('Saved query result in cache', 'yii\db\Command::query'); }
* @return string|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); } else { return $result; } }
$this->select = $select; $this->limit = $limit; $this->offset = $offset; if (empty($this->groupBy) && empty($this->having) && empty($this->union) && !$this->distinct) { return $command->queryScalar(); } else { return (new Query)->select([$selectExpression]) ->from(['c' => $this]) ->createCommand($command->db) ->queryScalar(); }
/** * @inheritdoc */ protected function queryScalar($selectExpression, $db) { if ($this->sql === null) { return parent::queryScalar($selectExpression, $db); } /* @var $modelClass ActiveRecord */ $modelClass = $this->modelClass; if ($db === null) { $db = $modelClass::getDb(); }
* If this parameter is not given (or null), the `db` application component will be used. * @return integer|string number of records. The result may be a string depending on the * underlying database engine and to support integer values higher than a 32bit PHP integer can handle. */ public function count($q = '*', $db = null) { 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; } /**
<section class=" pv-30 clearfix coursecontent"> <div class="container"> <div class="row"> <?php if (isset($dataProvider)) { if ($dataProvider->getTotalCount() > 0) { ?> <h2 class="text-center margin-clear"> Your Search Result For <span class="text-default">All <strong>Webinars</strong></span> </h2> <?php } else { ?> <h2 class="text-center margin-clear"> Your Search Result For <span class="text-default">All <strong>Webinars</strong></span> </h2>
*/ public function renderPhpFile($_file_, $_params_ = []) { ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); require($_file_); return ob_get_clean(); } /** * Renders dynamic content returned by the given PHP statements.
$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 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 InvalidParamException 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
return $this->render('training-list', [ 'keyword' => $search_keyword, 'search' => 1, 'dataProvider' => $dataProvider, 'recordedataProvider' =>$dataRecordedProvider ]); } public function actionWebinartrainingOld() { $session = Yii::$app->session; $site_id = $session['site_id']; $arrayCondition = ""; $arrayIndustryid = ""; $industrysizecount = "0"; if (isset($_GET['findindustry']) && $_GET['findindustry'] != "")
$args = $this->controller->bindActionParams($this, $params); Yii::trace('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; } else {
$params = $this->catchAll; unset($params[0]); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
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();
ini_set('memory_limit', '-1'); require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/../config/main_web.php'); (new yii\web\Application($config))->run();
$_GET = [ 'findindustry' => '5', 'fcourse' => 'all', 'fsub' => 'Human-Resources-%7C-Payroll', ]; $_SESSION = [ '__flash' => [], 'countrycode' => 'US', 'continentcode' => 'North America', 'contryid' => 1, 'continentid' => 1, 'currency' => 'USD', 'citycode' => 'NY', 'cityid' => 0, 'searchkeyword' => '', ];