[10501] PDOException in Connection.php line 362

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. // 参数绑定
  2. $this->bindValue($bind);
  3. // 执行查询
  4. $result = $this->PDOStatement->execute();
  5. // 调试结束
  6. $this->debug(false);
  7. $procedure = in_array(strtolower(substr(trim($sql), 0, 4)), ['call', 'exec']);
  8. return $this->getResult($class, $procedure);
  9. } catch (\PDOException $e) {
  10. throw new PDOException($e, $this->config, $this->queryStr);
  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 362
  2. at Connection->query('SELECT * FROM `xytzg...', [], false, false) in Query.php line 191
  3. at Query->query('SELECT * FROM `xytzg...', [], false, false) in Query.php line 2004
  4. at Query->find() in common.php line 237
  5. at positionss(null, 0) in Info.php line 76
  6. at Info->news() in Info.php line 27
  7. at Info->index()
  8. at ReflectionMethod->invokeArgs(object(Info), []) in App.php line 230
  9. at App::invokeMethod([object(Info), 'index']) in App.php line 393
  10. at App::module(['index', 'Info', 'index'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 138
  11. at App::run() in start.php line 18
  12. at require('/www/wwwroot/xyzdjd....') 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 ') 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 `xytzg_xinxi_class` WHERE ( C_Id= ) LIMIT 1
Database Config
type mysql
hostname localhost
database xyzdjd_com
username xyzdjd_com
password jndb5zTsyjwCGSB3x
hostport
dsn
params []
charset utf8
prefix xytzg_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
fields_strict true
resultset_type array
auto_timestamp false
sql_explain false
builder
query \think\db\Query

Environment Variables

GET Data
page 163
keyword
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
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.xyzdjd.com
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH /www/server/apache/lib
SERVER_SIGNATURE <address>Apache Server at www.xyzdjd.com Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME www.xyzdjd.com
SERVER_ADDR 172.16.8.88
SERVER_PORT 80
REMOTE_ADDR 54.211.203.45
DOCUMENT_ROOT /www/wwwroot/xyzdjd.com/
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /www/wwwroot/xyzdjd.com/
SERVER_ADMIN webmaster@example.com
SCRIPT_FILENAME /www/wwwroot/xyzdjd.com/index.php
REMOTE_PORT 47560
REDIRECT_URL /news163.html
REDIRECT_QUERY_STRING s=index/Info/index/p/news&page=163&keyword=
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING s=index/Info/index/p/news&page=163&keyword=
REQUEST_URI /news163.html
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711646863.8031
REQUEST_TIME 1711646863
PATH_INFO index/Info/index/p/news
Environment Variablesempty
ThinkPHP Constants
APP_PATH /www/wwwroot/xyzdjd.com/application/
THINK_VERSION 5.0.2
THINK_START_TIME 1711646863.8038
THINK_START_MEM 263400
EXT .php
DS /
THINK_PATH /www/wwwroot/xyzdjd.com/thinkphp/
LIB_PATH /www/wwwroot/xyzdjd.com/thinkphp/library/
CORE_PATH /www/wwwroot/xyzdjd.com/thinkphp/library/think/
TRAIT_PATH /www/wwwroot/xyzdjd.com/thinkphp/library/traits/
ROOT_PATH /www/wwwroot/xyzdjd.com/
EXTEND_PATH /www/wwwroot/xyzdjd.com/extend/
VENDOR_PATH /www/wwwroot/xyzdjd.com/vendor/
RUNTIME_PATH /www/wwwroot/xyzdjd.com/runtime/
LOG_PATH /www/wwwroot/xyzdjd.com/runtime/log/
CACHE_PATH /www/wwwroot/xyzdjd.com/runtime/cache/
TEMP_PATH /www/wwwroot/xyzdjd.com/runtime/temp/
CONF_PATH /www/wwwroot/xyzdjd.com/application/
CONF_EXT .php
ENV_PREFIX PHP_
IS_CLI false
IS_WIN false