Error Info: Array ( [0] => 23000 [1] => 1048 [2] => Column 'uuid' cannot be null )
in /data/www/wwwroot/aiyouxiba.com/vendor/yiisoft/yii2/db/Command.php at line 781
$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->refreshTableSchema(); return $n; } catch (\Exception $e) { Yii::endProfile($token, __METHOD__); throw $this->db->getSchema()->convertException($e, $rawSql); } } /** * Performs the actual DB query of a SQL statement. * @param string $method method of PDOStatement to be called
* @return array primary key values or false if the command fails * @since 2.0.4 */ public function insert($table, $columns) { $command = $this->db->createCommand()->insert($table, $columns); if (!$command->execute()) { return false; } $tableSchema = $this->getTableSchema($table); $result = []; foreach ($tableSchema->primaryKey as $name) { if ($tableSchema->columns[$name]->autoIncrement) {
protected function insertInternal($attributes = null) { if (!$this->beforeSave(true)) { return false; } $values = $this->getDirtyAttributes($attributes); if (($primaryKeys = static::getDb()->schema->insert($this->tableName(), $values)) === false) { return false; } foreach ($primaryKeys as $name => $value) { $id = $this->getTableSchema()->columns[$name]->phpTypecast($value); $this->setAttribute($name, $id); $values[$name] = $id;
if ($runValidation && !$this->validate($attributes)) { Yii::info('Model not inserted due to validation error.', __METHOD__); return false; } if (!$this->isTransactional(self::OP_INSERT)) { return $this->insertInternal($attributes); } $transaction = static::getDb()->beginTransaction(); try { $result = $this->insertInternal($attributes); if ($result === false) {
* meaning all attributes that are loaded from DB will be saved. * @return boolean whether the saving succeeded (i.e. no validation errors occurred). */ public function save($runValidation = true, $attributeNames = null) { if ($this->getIsNewRecord()) { return $this->insert($runValidation, $attributeNames); } else { return $this->update($runValidation, $attributeNames) !== false; } } /**
$play_log_info = $PlayLogInfo->find()->where(['uuid' => $uuid, 'gameid' => $id])->one(); if ($play_log_info) { PlayLogInfo::updateAllCounters(['num'=>1],['id'=>$play_log_info['id']]); } else { $PlayLogInfo->uuid = $uuid; $PlayLogInfo->gameid = $id; $PlayLogInfo->save(); } return Yii::$app->getResponse()->redirect($gameInfo['game_url']); }
$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); Yii::$app->controller = $oldController; return $result; } else { $id = $this->getUniqueId(); throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
$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();
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 = [ 'id' => '7', ]; $_SERVER = [ 'USER' => 'www', 'HOME' => '/home/www', 'FCGI_ROLE' => 'RESPONDER', 'APP_ENV' => 'production', 'SITE_LOG_DIR' => '/data1/www/wwwlogs/aiyouxiba.qgdzbz.com/', 'SCRIPT_FILENAME' => '/data/www/wwwroot/aiyouxiba.com/frontend/web/index.php', 'QUERY_STRING' => '', 'REQUEST_METHOD' => 'GET', 'CONTENT_TYPE' => '', 'CONTENT_LENGTH' => '', 'SCRIPT_NAME' => '/index.php', 'REQUEST_URI' => '/play/7/', 'DOCUMENT_URI' => '/index.php', 'DOCUMENT_ROOT' => '/data/www/wwwroot/aiyouxiba.com/frontend/web', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_SCHEME' => 'http', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_SOFTWARE' => 'nginx/1.13.6', 'REMOTE_ADDR' => '34.228.43.90', 'REMOTE_PORT' => '34248', 'SERVER_ADDR' => '172.17.172.68', 'SERVER_PORT' => '80', 'SERVER_NAME' => 'aiyouxiba.qgdzbz.com', 'REDIRECT_STATUS' => '200', 'PATH_INFO' => '', 'HTTP_ACCEPT' => '*/*', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_HOST' => 'h5.aiyouxiba.com', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1711726421.74862, 'REQUEST_TIME' => 1711726421, ];