错误语句:SELECT * FROM `tp_article` WHERE ( is_open = 1 and type = 1 and cat_id in ) ORDER BY publish_time desc LIMIT 5

[10501] PDOException in Connection.php line 404

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 publish_time desc LIMIT 5' at line 1

  1. // 调试结束
  2. $this->debug(false);
  3. // 返回结果集
  4. return $this->getResult($pdo, $procedure);
  5. } catch (\PDOException $e) {
  6. if ($this->config['break_reconnect'] && $this->isBreak($e)) {
  7. return $this->close()->query($sql, $bind, $master, $pdo);
  8. }
  9. echo '错误语句:'. $sql;
  10. throw new PDOException($e, $this->config, $this->getLastsql());
  11. }
  12. }
  13. /**
  14. * 执行语句
  15. * @access public
  16. * @param string $sql sql指令
  17. * @param array $bind 参数绑定
  18. * @return int

Call Stack

  1. in Connection.php line 404
  2. at Connection->query('SELECT * FROM `tp_ar...', [], false, false) in Query.php line 225
  3. at Query->query('SELECT * FROM `tp_ar...', [], false, false) in Query.php line 2299
  4. at Query->select() in Article.php line 537
  5. at Article->articleListnew()
  6. at ReflectionMethod->invokeArgs(object(Article), []) in App.php line 227
  7. at App::invokeMethod([object(Article), 'articleListnew'], []) in App.php line 401
  8. at App::module(['home', 'Article', 'articleListnew'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 133
  9. at App::run() in start.php line 18
  10. at require('/www/wwwroot/whyywsx...') in index.php line 52

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 publish_time desc LIMIT 5' 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 publish_time desc LIMIT 5' at line 1
Error SQL SELECT * FROM `tp_article` WHERE ( is_open = 1 and type = 1 and cat_id in ) ORDER BY publish_time desc LIMIT 5
Database Config
type mysql
hostname localhost
database whyywsxx
username whyywsxx
password ww330330
hostport 3306
dsn
params []
charset utf8
prefix tp_
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 Y-m-d H:i:s
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

GET Data

cat_id
90
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/whyywsxx.cn/index.php
QUERY_STRING
s=/home/Article/articleListnew/cat_id/90.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/home/Article/articleListnew/cat_id/90.html
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/whyywsxx.cn
SERVER_PROTOCOL
HTTP/2.0
REQUEST_SCHEME
https
HTTPS
on
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.15.10
REMOTE_ADDR
44.192.107.255
REMOTE_PORT
59704
SERVER_ADDR
172.30.13.2
SERVER_PORT
443
SERVER_NAME
whyywsxx.cn
REDIRECT_STATUS
200
PATH_INFO
/home/Article/articleListnew/cat_id/90.html
HTTP_HOST
whyywsxx.cn
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711635921.6723
REQUEST_TIME
1711635921
Environment Variables
empty

ThinkPHP Constants

PLUGIN_PATH
/www/wwwroot/whyywsxx.cn/plugins/
UPLOAD_PATH
public/upload/
TPSHOP_CACHE_TIME
31104000
SITE_URL
http://whyywsxx.cn
INSTALL_DATE
1463741583
SERIALNUMBER
20160520065303oCWIoa
APP_PATH
/www/wwwroot/whyywsxx.cn/application/
NOW_TIME
1711635921
THINK_VERSION
5.0.7
THINK_START_TIME
1711635921.6728
THINK_START_MEM
265520
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/whyywsxx.cn/thinkphp/
LIB_PATH
/www/wwwroot/whyywsxx.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/whyywsxx.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/whyywsxx.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/whyywsxx.cn/
EXTEND_PATH
/www/wwwroot/whyywsxx.cn/extend/
VENDOR_PATH
/www/wwwroot/whyywsxx.cn/vendor/
RUNTIME_PATH
/www/wwwroot/whyywsxx.cn/runtime/
LOG_PATH
/www/wwwroot/whyywsxx.cn/runtime/log/
CACHE_PATH
/www/wwwroot/whyywsxx.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/whyywsxx.cn/runtime/temp/
CONF_PATH
/www/wwwroot/whyywsxx.cn/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
IS_AJAX
false
IS_GET
true
IS_POST
false
MODULE_NAME
home
CONTROLLER_NAME
Article
ACTION_NAME
articleListnew
PREFIX
tp_
SESSION_ID
o7cs80aquh0vltotvprvvmoj77