[10501] PDOException in Connection.php line 384

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 arcrank = 0 AND createtime < ) ORDER BY `createtime` DESC 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 384
  2. at Connection->query('SELECT `id`,`title` ...', [], false, false) in Query.php line 255
  3. at Query->query('SELECT `id`,`title` ...', [], false, false) in Query.php line 2686
  4. at Query->find() in Index.php line 76
  5. at Index->details()
  6. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  7. at App::invokeMethod([object(Index), 'details'], []) in App.php line 611
  8. at App::module(['index', 'index', 'details'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'details']], ['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/users/HA551703/...') in index.php line 23

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 arcrank = 0 AND createtime < ) ORDER BY `createtime` DESC 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 arcrank = 0 AND createtime < ) ORDER BY `createtime` DESC LIMIT 1' at line 1
Error SQL SELECT `id`,`title` FROM `fa_archives` WHERE ( typeid = AND arcrank = 0 AND createtime < ) ORDER BY `createtime` DESC LIMIT 1
Database Config
type mysql
hostname p2bi3xyx.2371lan.dnstoo.com:3306
database fast
hostport
dsn
params []
charset utf8mb4
prefix fa_
debug false
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

id
54
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_REDIRECT_UNIQUE_ID
Zfj1938AAAEAAG@lcZ4AAAAB
REDIRECT_REDIRECT_PHPRC
/usr/local/zend/apache2/conf/extra/private_php/HA551703
REDIRECT_REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
Zfj1938AAAEAAG@lcZ4AAAAB
REDIRECT_PHPRC
/usr/local/zend/apache2/conf/extra/private_php/HA551703
REDIRECT_HANDLER
application/x-httpd-php7
REDIRECT_STATUS
200
UNIQUE_ID
Zfj1938AAAEAAG@lcZ4AAAAB
PHPRC
/usr/local/zend/apache2/conf/extra/private_php/HA551703
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
zzcy.zzgj.com
PATH
/usr/bin:/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
zzcy.zzgj.com
SERVER_ADDR
116.255.151.226
SERVER_PORT
80
REMOTE_ADDR
44.221.43.208
DOCUMENT_ROOT
/www/users/HA551703/WEB
SERVER_ADMIN
vhost@zzidc.com
SCRIPT_FILENAME
/www/users/HA551703/WEB/index.php
REMOTE_PORT
42432
REDIRECT_QUERY_STRING
id=54
REDIRECT_URL
/index.php/index/index/details.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
id=54
REQUEST_URI
/index/index/details.html?id=54
SCRIPT_NAME
/index.php
PATH_INFO
/index/index/details.html
PATH_TRANSLATED
/www/users/HA551703/WEB/index/index/details.html
ORIG_PATH_INFO
/index.php/index/index/details.html
ORIG_SCRIPT_NAME
/php71-cgi
ORIG_SCRIPT_FILENAME
/usr/local/zend/php7.1/bin/php-cgi
ORIG_PATH_TRANSLATED
/www/users/HA551703/WEB/index.php/index/index/details.html
PHP_SELF
/index.php/index/index/details.html
REQUEST_TIME_FLOAT
1710814711.3936
REQUEST_TIME
1710814711
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/users/HA551703/WEB/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1710814711.3953
THINK_START_MEM
358088
EXT
.php
DS
/
THINK_PATH
/www/users/HA551703/WEB/thinkphp/
LIB_PATH
/www/users/HA551703/WEB/thinkphp/library/
CORE_PATH
/www/users/HA551703/WEB/thinkphp/library/think/
TRAIT_PATH
/www/users/HA551703/WEB/thinkphp/library/traits/
ROOT_PATH
/www/users/HA551703/WEB/
EXTEND_PATH
/www/users/HA551703/WEB/extend/
VENDOR_PATH
/www/users/HA551703/WEB/vendor/
RUNTIME_PATH
/www/users/HA551703/WEB/runtime/
LOG_PATH
/www/users/HA551703/WEB/runtime/log/
CACHE_PATH
/www/users/HA551703/WEB/runtime/cache/
TEMP_PATH
/www/users/HA551703/WEB/runtime/temp/
CONF_PATH
/www/users/HA551703/WEB/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
PHP_FLOAT_DIG
15
PHP_FLOAT_EPSILON
2.2204460492503E-16
PHP_FLOAT_MIN
2.2250738585072E-308
PHP_FLOAT_MAX
1.7976931348623E+308
PHP_OS_FAMILY
Linux
FILTER_VALIDATE_BOOL
258
ADDON_PATH
/www/users/HA551703/WEB/addons/