错误语句:SELECT * FROM `ebx_goods_category` WHERE ( id = index ) LIMIT 1

[10501] PDOException in Connection.php line 391

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 'index ) LIMIT 1' at line 1

  1. // 调试结束
  2. $this->debug(false);
  3. // 返回结果集
  4. return $this->getResult($pdo, $procedure);
  5. } catch (\PDOException $e) {
  6. if ($this->isBreak($e)) {
  7. return $this->close()->query($sql, $bind, $master, $pdo);
  8. }
  9. echo '错误语句:'. $sql;
  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. echo '错误语句:'. $sql;
  16. throw $e;
  17. } catch (\Exception $e) {
  18. if ($this->isBreak($e)) {
  19. return $this->close()->query($sql, $bind, $master, $pdo);

Call Stack

  1. in Connection.php line 391
  2. at Connection->query('SELECT * FROM `ebx_g...', [], false, false) in Query.php line 227
  3. at Query->query('SELECT * FROM `ebx_g...', [], false, false) in Query.php line 2501
  4. at Query->find() in Goods.php line 25
  5. at Goods->index()
  6. at ReflectionMethod->invokeArgs(object(Goods), []) in App.php line 346
  7. at App::invokeMethod([object(Goods), 'index'], []) in App.php line 612
  8. at App::module(['Home', 'Goods', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 459
  9. at App::exec(['type' => 'module', 'module' => ['Home', 'Goods', 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 142
  10. at App::run() in start.php line 19
  11. at require('/www/wwwroot/rujiang...') in index.php line 33

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 'index ) 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 'index ) LIMIT 1' at line 1
Error SQL SELECT * FROM `ebx_goods_category` WHERE ( id = index ) LIMIT 1
Database Config
type mysql
hostname localhost
database rujiang_com
hostport 3306
dsn
params []
charset utf8
prefix ebx_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
fields_strict true
result_type 2
resultset_type array
auto_timestamp false
datetime_format Y-m-d H:i:s
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

GET Data

id
index
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
SCRIPT_NAME
/index.php
REQUEST_URI
/Home/Goods/index/id/index.html
QUERY_STRING
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_URL
/Home/Goods/index/id/index.html
REMOTE_PORT
50632
SCRIPT_FILENAME
/www/wwwroot/rujiang.com/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/rujiang.com
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
/www/wwwroot/rujiang.com
REMOTE_ADDR
44.203.235.24
SERVER_PORT
80
SERVER_ADDR
172.18.94.137
SERVER_NAME
rujiang.com
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at rujiang.com Port 80</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_HOST
rujiang.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
proxy-nokeepalive
1
REDIRECT_STATUS
200
REDIRECT_PATH_INFO
Home/Goods/index/id/index.html
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711662346.9372
REQUEST_TIME
1711662346
PATH_INFO
Home/Goods/index/id/index.html
Environment Variables
empty

ThinkPHP Constants

PLUGIN_PATH
/www/wwwroot/rujiang.com/plugins/
UPLOAD_PATH
public/upload/
TPSHOP_CACHE_TIME
1
SITE_URL
http://rujiang.com
APP_PATH
/www/wwwroot/rujiang.com/application/
NOW_TIME
1711662346
THINK_VERSION
5.0.15
THINK_START_TIME
1711662346.9376
THINK_START_MEM
393656
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/rujiang.com/thinkphp/
LIB_PATH
/www/wwwroot/rujiang.com/thinkphp/library/
CORE_PATH
/www/wwwroot/rujiang.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/rujiang.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/rujiang.com/
EXTEND_PATH
/www/wwwroot/rujiang.com/extend/
VENDOR_PATH
/www/wwwroot/rujiang.com/vendor/
RUNTIME_PATH
/www/wwwroot/rujiang.com/runtime/
LOG_PATH
/www/wwwroot/rujiang.com/runtime/log/
CACHE_PATH
/www/wwwroot/rujiang.com/runtime/cache/
TEMP_PATH
/www/wwwroot/rujiang.com/runtime/temp/
CONF_PATH
/www/wwwroot/rujiang.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
EXTEND_MODULE
1
EXTEND_ANDROID
2
EXTEND_IOS
3
EXTEND_ENTRUST
4
EXTEND_MINIAPP
5
EXTEND_H5
6
TIME_MOUTH
4
IS_AJAX
false
IS_GET
true
IS_POST
false
MODULE_NAME
home
CONTROLLER_NAME
Goods
ACTION_NAME
index
PREFIX
ebx_
SESSION_ID