Database Exception – yii\db\Exception
1. in /www/zy.21cnjy.com/vendor/yiisoft/yii2/db/Connection.php at line 568
559560561562563564565566567568569570571572573574575576577
$token = 'Opening DB connection: ' . $this->dsn; try { Yii::info($token, __METHOD__); Yii::beginProfile($token, __METHOD__); $this->pdo = $this->createPdoInstance(); $this->initConnection(); Yii::endProfile($token, __METHOD__); } catch (\PDOException $e) { Yii::endProfile($token, __METHOD__); throw new Exception($e->getMessage(), $e->errorInfo, (int) $e->getCode(), $e); } } public function close() {
890891892893894895896897898899900901902
* Returns the PDO instance for the currently active master connection. * This method will open the master DB connection and then return [[pdo]]. * @return PDO the PDO instance for the currently active master connection. */ public function getMasterPdo() { $this->open(); return $this->pdo; }
877878879880881882883884885886887888889
* is available and `$fallbackToMaster` is false. */ public function getSlavePdo($fallbackToMaster = true) { $db = $this->getSlave(false); if ($db === null) { return $fallbackToMaster ? $this->getMasterPdo() : null; } else { return $db->pdo; } }
213214215216217218219220221222223224225
if ($this->db->getTransaction()) { $forRead = false; } if ($forRead || $forRead === null && $this->db->getSchema()->isReadQuery($sql)) { $pdo = $this->db->getSlavePdo(); } else { $pdo = $this->db->getMasterPdo(); } try { $this->pdoStatement = $pdo->prepare($sql);
890891892893894895896897898899900901902
Yii::trace('Query result served from cache', 'yii\db\Command::query'); return $result[0]; } } } $this->prepare(true); $token = $rawSql; try { Yii::beginProfile($token, 'yii\db\Command::query'); $this->pdoStatement->execute();
356357358359360361362363364365366367368
* @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); }
207208209210211212213214215216217218219
*/ public function all($db = null) { if ($this->emulateExecution) { return []; } $rows = $this->createCommand($db)->queryAll(); return $this->populate($rows); }
8. in /www/zy.21cnjy.com/vendor/yiisoft/yii2/db/ActiveQuery.php at line 133 – yii\db\Query::all(null)
127128129130131132133134135136137138139
* @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); } public function prepare($builder)
268269270271272273274275276277278279280
$intro .=$val['intro']; } $res->softintro = $intro; } if (!empty($res->softintro)) { $keyword = BanedWords::find()->select(['keyword'])->asArray()->all(); $res->softintro = str_replace(array_column($keyword, 'keyword'), '',$res->softintro); } if($ret==true){ $data = Yii::createObject([ 'class' => 'yii\rest\Serializer', 'collectionEnvelope' => 'data',
10. app\controllers\SiteController::actionDetail('15449099', false)
11. in /www/zy.21cnjy.com/vendor/yiisoft/yii2/base/InlineAction.php at line 57 – call_user_func_array([app\controllers\SiteController, 'actionDetail'], ['15449099', false])
515253545556575859
$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); } }
150151152153154155156157158159160161162
} $result = null; if ($runAction && $this->beforeAction($action)) { $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); foreach ($modules as $module) {
517518519520521522523524525526527528529
$parts = $this->createController($route); if (is_array($parts)) { 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; }
14. in /www/zy.21cnjy.com/vendor/yiisoft/yii2/web/Application.php at line 102 – yii\base\Module::runAction('site/detail', ['itemid' => '15449099'])
96979899100101102103104105106107108
$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;
374375376377378379380381382383384385386
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();
9101112131415
$config = yii\helpers\ArrayHelper::merge( require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); $application = new yii\web\Application($config); $application->run();
网址:Database Exception – yii\db\Exception https://www.yuejiaxmz.com/news/view/130616
相关内容
Database Exception – yii\db\ExceptionDatabase Exception – yii\db\Exception
Database Exception – yii\db\Exception
Database Exception – yii\db\Exception
启动系统服务clickhouse报错clickhouse
python用workbook类方法带格式保存excel
数据库连接对象Connection对象的获取及相关知识总结
0731xair.com
如何使用数据AMQP的方式推送设备数据
【阿里云生活物联网架构师专题 ⑧】基于在 SpringBoot Java私有云上接收阿里云物联网设备的各种状态数据,实现m2m流转;