[10501] PDOException in Connection.php line 687

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 convert(name using gbk) asc, tid desc' at line 1

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

Call Stack

  1. in Connection.php line 687
  2. at Connection->query('SELECT * FROM `vhx_a...', ['ThinkBind_1_' => [0, 1]], false, false) in Connection.php line 923
  3. at Connection->select(object(Query)) in Query.php line 3007
  4. at Query->select() in common.php line 3413
  5. at getDataType(null, 'ArticleType', null, true, true) in IndexController.php line 356
  6. at IndexController->v()
  7. at ReflectionMethod->invokeArgs(object(IndexController), []) in Container.php line 395
  8. at Container->invokeReflectMethod(object(IndexController), object(ReflectionMethod), ['id' => '243', 'M' => 'news', 'C' => 'index', ...]) in Module.php line 132
  9. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  10. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  11. at Middleware->think\{closure}(object(Request))
  12. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  13. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  14. at Module->exec() in Dispatch.php line 168
  15. at Dispatch->run() in App.php line 432
  16. at App->think\{closure}(object(Request), object(Closure), null)
  17. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  18. at Middleware->think\{closure}(object(Request)) in SetApi.php line 102
  19. at SetApi->handle(object(Request), object(Closure), null)
  20. at call_user_func_array([object(SetApi), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  21. at Middleware->think\{closure}(object(Request)) in Menu.php line 67
  22. at Menu->handle(object(Request), object(Closure), null)
  23. at call_user_func_array([object(Menu), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  24. at Middleware->think\{closure}(object(Request)) in Share.php line 163
  25. at Share->handle(object(Request), object(Closure), null)
  26. at call_user_func_array([object(Share), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  27. at Middleware->think\{closure}(object(Request)) in Seo.php line 528
  28. at Seo->handle(object(Request), object(Closure), null)
  29. at call_user_func_array([object(Seo), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  30. at Middleware->think\{closure}(object(Request)) in ThirdDebug.php line 58
  31. at ThirdDebug->handle(object(Request), object(Closure), null)
  32. at call_user_func_array([object(ThirdDebug), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  33. at Middleware->think\{closure}(object(Request)) in Client.php line 389
  34. at Client->handle(object(Request), object(Closure), null)
  35. at call_user_func_array([object(Client), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  36. at Middleware->think\{closure}(object(Request)) in Theme.php line 141
  37. at Theme->handle(object(Request), object(Closure), null)
  38. at call_user_func_array([object(Theme), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  39. at Middleware->think\{closure}(object(Request))
  40. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  41. at Middleware->dispatch(object(Request)) in App.php line 435
  42. at App->run() 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 convert(name using gbk) asc, tid 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 convert(name using gbk) asc, tid desc' at line 1
Error SQL SELECT * FROM `vhx_article_type` WHERE `is_delete` = 0 AND `pid` = ORDER BY convert(name using gbk) asc, tid desc
Database Config
type mysql
hostname 127.0.0.1
database rongdev3
hostport
dsn
params []
charset utf8
prefix vhx_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
resultset_type array
auto_timestamp false
datetime_format Y-m-d H:i:s
sql_explain false
builder
query \think\db\Query
break_reconnect false
break_match_str []

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
FCGI_ROLE RESPONDER
SCRIPT_FILENAME /www/wwwroot/customer/rongdelaw/public/index.php
QUERY_STRING s=/news/index/v/id/243
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /news/index/v/id/243
DOCUMENT_URI /index.php
DOCUMENT_ROOT /www/wwwroot/customer/rongdelaw/public
SERVER_PROTOCOL HTTP/2.0
REQUEST_SCHEME https
HTTPS on
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.21.4
REMOTE_ADDR 44.200.77.59
REMOTE_PORT 39470
SERVER_ADDR 60.247.147.58
SERVER_PORT 443
SERVER_NAME rongdelaw.com
REDIRECT_STATUS 200
PATH_INFO
HTTP_HOST rongdelaw.com
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
HTTP_REFERER http://rongdelaw.com/news/index/v/id/243
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711649128.9411
REQUEST_TIME 1711649128
Environment Variablesempty
ThinkPHP Constants
url /news/index/v/id/243
ent claudebot
site https://lh.zhlgch.com
road /?ym=rongdelaw.com/news/index/v/id/243
regs @Baidu|Sogou|Yisou|Haosou|Spider|So.com|Sm.cn@i
mobile /phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/
area false
NOW_TIME 1711649128