[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 ') AND ( sort> ) ORDER BY `sort` ASC LIMIT 1' 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 `her_n...', [], false, false) in Query.php line 255
  3. at Query->query('SELECT * FROM `her_n...', [], false, false) in Query.php line 2686
  4. at Query->find() in Index.php line 238
  5. at Index->detail('188640')
  6. at ReflectionMethod->invokeArgs(object(Index), ['188640']) in App.php line 343
  7. at App::invokeMethod([object(Index), 'detail'], []) in App.php line 611
  8. at App::module(['index', 'index', 'detail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 457
  9. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'detail']], ['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('/www/wwwroot/www/sou...') in index.php line 11

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 ') AND ( sort> ) ORDER BY `sort` ASC LIMIT 1' 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 ') AND ( sort> ) ORDER BY `sort` ASC LIMIT 1' at line 1
Error SQL SELECT * FROM `her_news` WHERE ( status=10 ) AND ( type_id= ) AND ( sort> ) ORDER BY `sort` ASC LIMIT 1
Database Config
type mysql
hostname localhost
database my6521384
hostport 3306
dsn
params []
charset utf8
prefix her_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
result_type 2
resultset_type collection
auto_timestamp true
datetime_format Y-m-d H:i:s
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
REDIRECT_STATUS
200
proxy-nokeepalive
1
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
www.gojue.com
PATH
/www/server/panel/pyenv/bin:/www/server/panel/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
LD_LIBRARY_PATH
/www/server/apache/lib
SERVER_SIGNATURE
<address>Apache Server at www.gojue.com Port 80</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.gojue.com
SERVER_ADDR
10.61.33.219
SERVER_PORT
80
REMOTE_ADDR
18.234.55.154
DOCUMENT_ROOT
/www/wwwroot/www
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/www
SERVER_ADMIN
webmaster@example.com
SCRIPT_FILENAME
/www/wwwroot/www/index.php
REMOTE_PORT
58296
REDIRECT_URL
/index/detail/content/188640.html
REDIRECT_QUERY_STRING
s=/index/detail/content/188640.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
s=/index/detail/content/188640.html
REQUEST_URI
/index/detail/content/188640.html
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711658339.0533
REQUEST_TIME
1711658339
PATH_INFO
/index/detail/content/188640.html
Environment Variables
empty

ThinkPHP Constants

BIND_MODULE
index
UPLOAD_PATH
/www/wwwroot/www/
APP_PATH
./source/application/
APP_DEBUG
true
THINK_VERSION
5.0.24
THINK_START_TIME
1711658339.0538
THINK_START_MEM
264040
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www/source/thinkphp/
LIB_PATH
/www/wwwroot/www/source/thinkphp/library/
CORE_PATH
/www/wwwroot/www/source/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www/source/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www/source/
EXTEND_PATH
/www/wwwroot/www/source/extend/
VENDOR_PATH
/www/wwwroot/www/source/vendor/
RUNTIME_PATH
/www/wwwroot/www/source/runtime/
LOG_PATH
/www/wwwroot/www/source/runtime/log/
CACHE_PATH
/www/wwwroot/www/source/runtime/cache/
TEMP_PATH
/www/wwwroot/www/source/runtime/temp/
CONF_PATH
./source/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
QINIU_FUNCTIONS_VERSION
7.2.5