[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 ') 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 `hm_co...', [], false, false) in Query.php line 255
  3. at Query->query('SELECT * FROM `hm_co...', [], false, false) in Query.php line 2686
  4. at Query->find() in Base.php line 67
  5. at Base->findObj('\app\index\model\Col...', 'isshow = 1 and id = ') in Index.php line 90
  6. at Index->show()
  7. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  8. at App::invokeMethod([object(Index), 'show'], []) in App.php line 611
  9. at App::module(['index', 'index', 'show'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  10. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'show']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  11. at App::run() in start.php line 19
  12. at require('/www/wwwroot/tcsolar...') in index.php line 24

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 ') 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 ') LIMIT 1' at line 1
Error SQL SELECT * FROM `hm_column` WHERE ( isshow = 1 and id = ) LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database tcsolar_com
hostport 3306
dsn
params []
charset utf8
prefix hm_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict false
result_type 2
resultset_type \think\Collection
auto_timestamp false
datetime_format false
sql_explain false
builder
query \think\db\Query
break_reconnect false
SESSION_AUTO_START true

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
www.tcsolar.com.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/index/show/tid/48
REDIRECT_STATUS
200
SERVER_NAME
tcsolar.com.cn
SERVER_PORT
80
SERVER_ADDR
172.31.247.75
REMOTE_PORT
51130
REMOTE_ADDR
54.227.104.229
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/tcsolar.com.cn
DOCUMENT_URI
/index.php/index/show/tid/48
REQUEST_URI
/index.php/index/show/tid/48
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/www/wwwroot/tcsolar.com.cn/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/index/show/tid/48
REQUEST_TIME_FLOAT
1711644797.7952
REQUEST_TIME
1711644797
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/tcsolar.com.cn/application/
RUNTIME_PATH
/www/wwwroot/tcsolar.com.cn/runtime/
BIND_MODULE
index
THINK_VERSION
5.0.24
THINK_START_TIME
1711644797.7957
THINK_START_MEM
389712
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/tcsolar.com.cn/thinkphp/
LIB_PATH
/www/wwwroot/tcsolar.com.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/tcsolar.com.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/tcsolar.com.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/tcsolar.com.cn/
EXTEND_PATH
/www/wwwroot/tcsolar.com.cn/extend/
VENDOR_PATH
/www/wwwroot/tcsolar.com.cn/vendor/
LOG_PATH
/www/wwwroot/tcsolar.com.cn/runtime/log/
CACHE_PATH
/www/wwwroot/tcsolar.com.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/tcsolar.com.cn/runtime/temp/
CONF_PATH
/www/wwwroot/tcsolar.com.cn/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false