[10501] PDOException in Connection.php line 388

SQLSTATE[42000]: Syntax error or access violation: 1064 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 ') ) ORDER BY `main`.`sort` ASC' at line 1

  1. $this->PDOStatement->execute();
  2. // 调试结束
  3. $this->debug(false);
  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 388
  2. at Connection->query('SELECT `main`.`id`,`...', [], false, false) in Query.php line 227
  3. at Query->query('SELECT `main`.`id`,`...', [], false, false) in Query.php line 2351
  4. at Query->select() in Country.php line 54
  5. at Country->index()
  6. at ReflectionMethod->invokeArgs(object(Country), []) in App.php line 343
  7. at App::invokeMethod([object(Country), 'index'], []) in App.php line 595
  8. at App::module(['globevisapc', 'country', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], null) in App.php line 457
  9. at App::exec(['type' => 'module', 'module' => ['globevisapc', 'country', 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 139
  10. at App::run() in start.php line 19
  11. at require('/wwwnew/html/globevi...') in index.php line 16

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 MySQL server version for the right syntax to use near ') ) ORDER BY `main`.`sort` ASC' 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 MySQL server version for the right syntax to use near ') ) ORDER BY `main`.`sort` ASC' at line 1
Error SQL SELECT `main`.`id`,`detail`.`name`,`main`.`squareFlag`,`detailEn`.`name` as `nameEn` FROM `globe_country` `main` INNER JOIN `globe_country_detail` `detail` ON `detail`.`countryID`=`main`.`id` INNER JOIN `globe_country_detail_en` `detailEn` ON `detailEn`.`countryID`=`main`.`id` WHERE ( `main`.`status` = 1 AND `main`.`isDelete` = 0 AND `main`.`id` IN() ) ORDER BY `main`.`sort` ASC
Database Config
type mysql
hostname rm-2zef0627pon76e9kxlo.mysql.rds.aliyuncs.com
database globevisa
hostport 3306
dsn
params []
charset utf8
prefix
debug true
deploy 0
rw_separate false
master_num 1
slave_no
fields_strict true
result_type 2
resultset_type array
auto_timestamp false
datetime_format false
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

GET Data

id
146
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/dev/null
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/wwwnew/html/globevisa/publicnew/index.php
QUERY_STRING
s=/globevisapc/country/index&id=146
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/globevisapc/country/index?id=146
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/wwwnew/html/globevisa/publicnew
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.7.11
REMOTE_ADDR
47.93.181.24
REMOTE_PORT
2818
SERVER_ADDR
47.93.181.24
SERVER_PORT
443
SERVER_NAME
www.globevisa.com.cn
REDIRECT_STATUS
200
HTTP_HOST
www.globevisa.com.cn
HTTP_ACCEPT
*/*
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1552499450.6892
REQUEST_TIME
1552499450
PATH_INFO
/globevisapc/country/index
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/wwwnew/html/globevisa/publicnew/../application/
THINK_VERSION
5.0.14
THINK_START_TIME
1552499450.6895
THINK_START_MEM
258072
EXT
.php
DS
/
THINK_PATH
/wwwnew/html/globevisa/thinkphp/
LIB_PATH
/wwwnew/html/globevisa/thinkphp/library/
CORE_PATH
/wwwnew/html/globevisa/thinkphp/library/think/
TRAIT_PATH
/wwwnew/html/globevisa/thinkphp/library/traits/
ROOT_PATH
/wwwnew/html/globevisa/
EXTEND_PATH
/wwwnew/html/globevisa/extend/
VENDOR_PATH
/wwwnew/html/globevisa/vendor/
RUNTIME_PATH
/wwwnew/html/globevisa/runtime/
LOG_PATH
/wwwnew/html/globevisa/runtime/log/
CACHE_PATH
/wwwnew/html/globevisa/runtime/cache/
TEMP_PATH
/wwwnew/html/globevisa/runtime/temp/
CONF_PATH
/wwwnew/html/globevisa/publicnew/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false