[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 a.arcrank=0 ) 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 COUNT(*) AS t...', [], false, true) in Query.php line 255
  3. at Query->query('SELECT COUNT(*) AS t...', [], false, true) in Query.php line 2470
  4. at Query->getPdo() in Query.php line 441
  5. at Query->value('COUNT(*) AS tp_count', 0, true) in Query.php line 576
  6. at Query->aggregate('COUNT', '*', true) in Query.php line 551
  7. at Query->count() in Query.php line 1484
  8. at Query->paginate(6, false, ['page' => 1, 'type' => 'bootstrap', 'var_page' => 'list_page', ...]) in Archives.php line 343
  9. at Archives->getProjectList('a.id,a.litpic,a.titl...', 1, '(a.typeid=) and a.ar...', ['a.weight' => 'desc', 'a.id' => 'desc'], 6) in Projects.php line 128
  10. at Projects->lists(object(Request))
  11. at ReflectionMethod->invokeArgs(object(Projects), [object(Request)]) in App.php line 343
  12. at App::invokeMethod([object(Projects), 'lists'], []) in App.php line 611
  13. at App::module([null, 'projects', 'lists'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  14. at App::exec(['type' => 'module', 'module' => [null, 'projects', 'lists'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  15. at App::run() in start.php line 19
  16. at require('/alidata1/www/p-skin...') in index.php line 17

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 a.arcrank=0 ) 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 a.arcrank=0 ) LIMIT 1' at line 1
Error SQL SELECT COUNT(*) AS tp_count FROM `os_archives` `a` INNER JOIN `os_category` `b` ON `a`.`typeid`=`b`.`id` WHERE ( (a.typeid=) and a.arcrank=0 ) LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database tp_pskin
hostport
dsn
params []
charset utf8
prefix os_
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
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

TEMP
/tmp
TMPDIR
/tmp
TMP
/tmp
PATH
/usr/local/bin:/usr/bin:/bin
USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.p-skin.com
REDIRECT_STATUS
200
SERVER_NAME
www.p-skin.com
SERVER_PORT
443
SERVER_ADDR
172.18.0.50
REMOTE_PORT
48878
REMOTE_ADDR
3.237.178.126
SERVER_SOFTWARE
nginx/1.16.1
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/alidata1/www/p-skin.com
DOCUMENT_URI
/index.php
REQUEST_URI
/projects/SkinSkin/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/projects/SkinSkin/
SCRIPT_FILENAME
/alidata1/www/p-skin.com/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711627824.1601
REQUEST_TIME
1711627824
PATH_INFO
/projects/SkinSkin/
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/alidata1/www/p-skin.com/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711627824.1603
THINK_START_MEM
357800
EXT
.php
DS
/
THINK_PATH
/alidata1/www/p-skin.com/thinkphp/
LIB_PATH
/alidata1/www/p-skin.com/thinkphp/library/
CORE_PATH
/alidata1/www/p-skin.com/thinkphp/library/think/
TRAIT_PATH
/alidata1/www/p-skin.com/thinkphp/library/traits/
ROOT_PATH
/alidata1/www/p-skin.com/
EXTEND_PATH
/alidata1/www/p-skin.com/extend/
VENDOR_PATH
/alidata1/www/p-skin.com/vendor/
RUNTIME_PATH
/alidata1/www/p-skin.com/runtime/
LOG_PATH
/alidata1/www/p-skin.com/runtime/log/
CACHE_PATH
/alidata1/www/p-skin.com/runtime/cache/
TEMP_PATH
/alidata1/www/p-skin.com/runtime/temp/
CONF_PATH
/alidata1/www/p-skin.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false