[10501] PDOException in Connection.php line 389

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1

  1. $this->PDOStatement->execute();
  2. // 调试结束
  3. $this->debug(false, '', $master);
  4. // 返回结果集
  5. return $this->getResult($pdo, $procedure);
  6. } catch (\PDOException $e) {
  7. if ($this->isBreak($e)) {
  8. return $this->close()->query($sql, $bind, $master, $pdo);
  9. }
  10. throw new PDOException($e, $this->config, $this->getLastsql());
  11. } catch (\Throwable $e) {
  12. if ($this->isBreak($e)) {
  13. return $this->close()->query($sql, $bind, $master, $pdo);
  14. }
  15. throw $e;
  16. } catch (\Exception $e) {
  17. if ($this->isBreak($e)) {
  18. return $this->close()->query($sql, $bind, $master, $pdo);
  19. }

Call Stack

  1. in Connection.php line 389
  2. at Connection->query('SELECT * FROM `infos...', [], false, false) in Query.php line 255
  3. at Query->query('SELECT * FROM `infos...', [], false, false) in Query.php line 2523
  4. at Query->select() in News.php line 88
  5. at News->info()
  6. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  7. at App::invokeMethod([object(News), 'info'], []) in App.php line 611
  8. at App::module(['Index', 'news', 'info'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => ['Index', 'news', 'info']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  10. at App::run() in start.php line 19
  11. at require('/data/www/jnygjd.com...') in index.php line 19

Exception Datas

PDO Error Info
SQLSTATE 42000
Driver Error Code 1064
Driver Error Message You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
Database Status
Error Code 10501
Error Message SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
Error SQL SELECT * FROM `infos_tags` WHERE ( group_id= )
Database Config
type mysql
hostname 127.0.0.1
database jnygjd
hostport
dsn
params []
charset utf8
prefix
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
result_type 2
resultset_type array
auto_timestamp false
datetime_format Y-m-d H:i:s
sql_explain false
builder
query \think\db\Query
break_reconnect true

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

UNIQUE_ID
X@BZWzTP@EE-rru@NHmOCgAAAMo
HTTPS
on
SSL_TLS_SNI
www.jnygjd.com
HTTP_USER_AGENT
Mozilla/5.0 (compatible;MSIE5.01;Windows NT 5.0)
HTTP_HOST
www.jnygjd.com
HTTP_ACCEPT
*/*
HTTP_ACCEPT_CHARSET
utf-8
CONTENT_LENGTH
0
CONTENT_TYPE
application/x-www-form-urlencoded
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH
/usr/local/apache/lib:/usr/local/openssl/lib
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
www.jnygjd.com
SERVER_ADDR
172.31.217.29
SERVER_PORT
443
REMOTE_ADDR
8.210.218.63
DOCUMENT_ROOT
/data/www/jnygjd.com
REQUEST_SCHEME
https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/data/www/jnygjd.com
SERVER_ADMIN
8424356@qq.com
SCRIPT_FILENAME
/data/www/jnygjd.com/index.php
REMOTE_PORT
58294
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/index.php/Index/news/info/id/135.html
SCRIPT_NAME
/index.php
PATH_INFO
/Index/news/info/id/135.html
PATH_TRANSLATED
/data/www/jnygjd.com/Index/news/info/id/135.html
PHP_SELF
/index.php/Index/news/info/id/135.html
REQUEST_TIME_FLOAT
1608538459.662
REQUEST_TIME
1608538459
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/data/www/jnygjd.com/application/
APP_DEBUG
true
THINK_VERSION
5.0.24
THINK_START_TIME
1608538459.6631
THINK_START_MEM
359496
EXT
.php
DS
/
THINK_PATH
/data/www/jnygjd.com/thinkphp/
LIB_PATH
/data/www/jnygjd.com/thinkphp/library/
CORE_PATH
/data/www/jnygjd.com/thinkphp/library/think/
TRAIT_PATH
/data/www/jnygjd.com/thinkphp/library/traits/
ROOT_PATH
/data/www/jnygjd.com/
EXTEND_PATH
/data/www/jnygjd.com/extend/
VENDOR_PATH
/data/www/jnygjd.com/vendor/
RUNTIME_PATH
/data/www/jnygjd.com/runtime/
LOG_PATH
/data/www/jnygjd.com/runtime/log/
CACHE_PATH
/data/www/jnygjd.com/runtime/cache/
TEMP_PATH
/data/www/jnygjd.com/runtime/temp/
CONF_PATH
/data/www/jnygjd.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false