解决PDOException in Connection.php line 687 sqlstate[42000]: syntax error or access violation: 1055
在测试简约强大的贷超系统/海豚DolphinPHP开发/渠道注册量/渠道分析等/全开源无授权源码的时候,前台好好的,我去后台登陆的时候报sqlstate[42000]: syntax error or access violation: 1055。。。。。。错误,错误如下,一看就是数据库问题然后百度了下,找到了如下办法:
完美解决办法:
在对应数据库版本的my.ini中添加sql_mode=""然后保存,再重启mysql服务即可完美解决。
[10501] PDOException in Connection.php line 687
$this->debug(false, '', $master);
// 返回结果集
return $this->getResult($pdo, $procedure);
} catch (PDOException $e) {
if ($this->isBreak($e)) {
return $this->close()->query($sql, $bind, $master, $pdo);
}
throw new PDOException($e, $this->config, $this->getLastsql());
} catch (Throwable $e) {
if ($this->isBreak($e)) {
return $this->close()->query($sql, $bind, $master, $pdo);
}
throw $e;
} catch (Exception $e) {
if ($this->isBreak($e)) {
return $this->close()->query($sql, $bind, $master, $pdo);