[10501] PDOException in Connection.php line 385

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 `sort` DESC,`id` DESC' 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 385
  2. at Connection->query('SELECT * FROM `snake...', [], false, false) in Query.php line 255
  3. at Query->query('SELECT * FROM `snake...', [], false, false) in Query.php line 2523
  4. at Query->select() in News.php line 15
  5. at News->index()
  6. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  7. at App::invokeMethod([object(News), 'index'], []) in App.php line 611
  8. at App::module(['index', 'news', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 457
  9. at App::exec(['type' => 'module', 'module' => ['index', 'news', 'index']], ['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/home/qxu205884...') in index.php line 21

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 `sort` DESC,`id` DESC' 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 `sort` DESC,`id` DESC' at line 1
Error SQL SELECT * FROM `snake_news` WHERE ( classid= ) ORDER BY `sort` DESC,`id` DESC
Database Config
type mysql
hostname qdm154828122.my3w.com
database qdm154828122_db
hostport 3306
dsn
params []
charset utf8
prefix snake_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict false
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
empty
POST Data
empty
Files
empty

Cookies

$Version
1
PHPSESSID
f0lkq0csl6f9vetjj4hnv8jic5
$Path
/
Session
empty

Server/Request Data

DOCUMENT_ROOT
/usr/home/qxu2058840042/htdocs
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
text/html,image/png,image/jpeg,image/pjpeg,image/x-xbitmap,image/svg+xml,image/gif;q=0.9,*/*;q=0.1
HTTP_ACCEPT_ENCODING
gzip, identity;q=0.9
HTTP_ACCEPT_LANGUAGE
zh_TW, en, *
HTTP_CONNECTION
keep-alive
HTTP_COOKIE
$Version=1; PHPSESSID=f0lkq0csl6f9vetjj4hnv8jic5; $Path=/
HTTP_HOST
www.leraker.cn
HTTP_REFERER
http://www.leraker.cn/
HTTP_USER_AGENT
Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)
PATH
/bin:/usr/bin
PHPRC
/var/www/php55/hichina_ini/qxu2058840042
QUERY_STRING
REDIRECT_DOCUMENT_ROOT
/usr/home/qxu2058840042/htdocs
REDIRECT_GATEWAY_INTERFACE
CGI/1.1
REDIRECT_HTTP_ACCEPT
text/html,image/png,image/jpeg,image/pjpeg,image/x-xbitmap,image/svg+xml,image/gif;q=0.9,*/*;q=0.1
REDIRECT_HTTP_ACCEPT_ENCODING
gzip, identity;q=0.9
REDIRECT_HTTP_ACCEPT_LANGUAGE
zh_TW, en, *
REDIRECT_HTTP_CONNECTION
keep-alive
REDIRECT_HTTP_COOKIE
$Version=1; PHPSESSID=f0lkq0csl6f9vetjj4hnv8jic5; $Path=/
REDIRECT_HTTP_HOST
www.leraker.cn
REDIRECT_HTTP_REFERER
http://www.leraker.cn/
REDIRECT_HTTP_USER_AGENT
Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)
REDIRECT_PATH
/bin:/bin/sbin/:/usr/sbin/:/usr/bin/:/usr/local/bin/:/sbin
REDIRECT_PATH_INFO
index/news/index.html
REDIRECT_PATH_TRANSLATED
redirect:/index.php/index.html
REDIRECT_QUERY_STRING
REDIRECT_REMOTE_ADDR
27.147.31.48
REDIRECT_REMOTE_PORT
61830
REDIRECT_REQUEST_METHOD
GET
REDIRECT_REQUEST_URI
/index/news/index.html
REDIRECT_SCRIPT_FILENAME
/usr/home/qxu2058840042/htdocs/index
REDIRECT_SCRIPT_NAME
/index
REDIRECT_SCRIPT_URI
http://www.leraker.cn/index/news/index.html
REDIRECT_SCRIPT_URL
/index/news/index.html
REDIRECT_SERVER_ADDR
139.129.175.163
REDIRECT_SERVER_ADMIN
webmaster@qxu2058840042.my3w.com
REDIRECT_SERVER_NAME
www.leraker.cn
REDIRECT_SERVER_PORT
80
REDIRECT_SERVER_PROTOCOL
HTTP/1.1
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE
Apache
REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
X-73kQofSwcAAGuSPzsAAAAJ
REDIRECT_URL
/index/news/index.html
REDIRECT_gzip_only_text_html
1
REMOTE_ADDR
27.147.31.48
REMOTE_PORT
61830
REQUEST_METHOD
GET
REQUEST_URI
/index/news/index.html
SCRIPT_FILENAME
/usr/home/qxu2058840042/htdocs/index.php
SCRIPT_NAME
/index.php
SCRIPT_URI
http://www.leraker.cn/index/news/index.html
SCRIPT_URL
/index/news/index.html
SERVER_ADDR
139.129.175.163
SERVER_ADMIN
webmaster@qxu2058840042.my3w.com
SERVER_NAME
www.leraker.cn
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
UNIQUE_ID
X-73kQofSwcAAGuSPzsAAAAJ
gzip_only_text_html
1
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1610545041.8668
REQUEST_TIME
1610545041
PATH_INFO
index/news/index.html
Environment Variables
empty

ThinkPHP Constants

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