[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 MariaDB server version for the right syntax to use near 'html, 'active', '') as active FROM `tp_category` WHERE ( type='article' and...' 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() in Query.php line 255
  3. at Query->query() in Query.php line 2523
  4. at Query->select() in Article.php line 55
  5. at Article->index()
  6. at ReflectionMethod->invokeArgs() in App.php line 343
  7. at App::invokeMethod() in App.php line 611
  8. at App::module() in App.php line 456
  9. at App::exec() in App.php line 139
  10. at App::run() in start.php line 19
  11. at require('/var/www/vhosts/idsh...') in index.php line 74

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 'html, 'active', '') as active FROM `tp_category` WHERE ( type='article' and...' 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 'html, 'active', '') as active FROM `tp_category` WHERE ( type='article' and...' at line 1
Error SQL SELECT *, if(id=163.html, 'active', '') as active FROM `tp_category` WHERE ( type='article' and status = 'normal' and (pid = 161 or id = 161) ) ORDER BY `weigh` DESC
Database Config
type mysql
hostname 127.0.0.1
database idshow
hostport
dsn
params []
charset utf8
prefix tp_
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 false
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

GET Data

cid
163
page
19
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
idshow.com.tw_4dzbizbka2g
HOME
/var/www/vhosts/idshow.com.tw
SCRIPT_NAME
/index.php
REQUEST_URI
/index/article/index/cid/163.html?cid=163&page=19
QUERY_STRING
s=index/article/index/cid/163.html&cid=163&page=19
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.0
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
s=index/article/index/cid/163.html&cid=163&page=19
REDIRECT_URL
/index/article/index/cid/163.html
REMOTE_PORT
44012
SCRIPT_FILENAME
/var/www/vhosts/idshow.com.tw/httpdocs/www/index.php
SERVER_ADMIN
root@localhost
CONTEXT_DOCUMENT_ROOT
/var/www/vhosts/idshow.com.tw/httpdocs/www
CONTEXT_PREFIX
REQUEST_SCHEME
https
DOCUMENT_ROOT
/var/www/vhosts/idshow.com.tw/httpdocs/www
REMOTE_ADDR
172.70.34.32
SERVER_PORT
443
SERVER_ADDR
192.168.211.9
SERVER_NAME
www.idshow.com.tw
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_CF_CONNECTING_IP
44.200.230.43
HTTP_REFERER
https://idshow.com.tw/index/article/index/cid/163.html?cid=163&page=19
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_CF_VISITOR
{"scheme":"https"}
HTTP_X_FORWARDED_PROTO
https
HTTP_CF_RAY
86b86938caa5599e-IAD
HTTP_ACCEPT_ENCODING
gzip, br
HTTP_CF_IPCOUNTRY
US
HTTP_CDN_LOOP
cloudflare
HTTP_CONNECTION
close
HTTP_X_ACCEL_INTERNAL
/internal-nginx-static-location
HTTP_X_FORWARDED_FOR
44.200.230.43
HTTP_X_REAL_IP
172.70.34.32
HTTP_HOST
www.idshow.com.tw
proxy-nokeepalive
1
HTTPS
on
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY
0
PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY
0
PERL5LIB
/usr/share/awstats/lib:/usr/share/awstats/plugins
SCRIPT_URI
https://www.idshow.com.tw/index/article/index/cid/163.html
SCRIPT_URL
/index/article/index/cid/163.html
UNIQUE_ID
ZgWC0VaL4h2gyG-uVlFDEAAAAAU
REDIRECT_STATUS
200
REDIRECT_HTTPS
on
REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY
0
REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY
0
REDIRECT_PERL5LIB
/usr/share/awstats/lib:/usr/share/awstats/plugins
REDIRECT_SCRIPT_URI
https://www.idshow.com.tw/index/article/index/cid/163.html
REDIRECT_SCRIPT_URL
/index/article/index/cid/163.html
REDIRECT_UNIQUE_ID
ZgWC0VaL4h2gyG-uVlFDEAAAAAU
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711637201.3933
REQUEST_TIME
1711637201
PATH_INFO
index/article/index/cid/163.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/Application/
THINK_VERSION
5.0.23
THINK_START_TIME
1711637201.3937
THINK_START_MEM
367088
EXT
.php
DS
/
THINK_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/ThinkPHP/
LIB_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/ThinkPHP/library/
CORE_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/ThinkPHP/library/think/
TRAIT_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/ThinkPHP/library/traits/
ROOT_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/
EXTEND_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/extend/
VENDOR_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/vendor/
RUNTIME_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/runtime/
LOG_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/runtime/log/
CACHE_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/runtime/cache/
TEMP_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/runtime/temp/
CONF_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/Application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/var/www/vhosts/idshow.com.tw/httpdocs/www/addons/