错误语句:SELECT `a`.`goods_name`,`a`.`goods_id`,`a`.`shop_price`,`a`.`market_price`,`a`.`cat_id`,`b`.`parent_id_path`,`b`.`parent_id`,`b`.`name`,`a`.`suppliers_id`,`a`.`on_time`,`a`.`original_img`,`a`.`click_count` FROM `tp_goods` `a` LEFT JOIN `tp_goods_category` `b` ON `a`.`cat_id`=b.id and b.cid=248 WHERE ( a.is_=1 and a.is_on_sale=1 and a.status=1 and a.cat_id= ) AND `a`.`cid` = '248' ORDER BY `a`.`sort` LIMIT 10

[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 ') AND `a`.`cid` = '248' ORDER BY `a`.`sort` LIMIT 10' 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 `a`.`goods_na...', [], false, false) in Query.php line 253
  3. at Query->query('SELECT `a`.`goods_na...', [], false, false) in Query.php line 2428
  4. at Query->select() in Goods.php line 1790
  5. at Goods->getGoodsList()
  6. at ReflectionMethod->invokeArgs(object(Goods), []) in App.php line 346
  7. at App::invokeMethod([object(Goods), 'getGoodsList'], []) in App.php line 613
  8. at App::module(['Home', 'goods', 'getGoodsList'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 459
  9. at App::exec(['type' => 'module', 'module' => ['Home', 'goods', 'getGoodsList']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 142
  10. at App::run() in start.php line 36
  11. at require('/usr/share/nginx/htm...') in index.php line 68

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`.`cid` = '248' ORDER BY `a`.`sort` LIMIT 10' 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`.`cid` = '248' ORDER BY `a`.`sort` LIMIT 10' at line 1
Error SQL SELECT `a`.`goods_name`,`a`.`goods_id`,`a`.`shop_price`,`a`.`market_price`,`a`.`cat_id`,`b`.`parent_id_path`,`b`.`parent_id`,`b`.`name`,`a`.`suppliers_id`,`a`.`on_time`,`a`.`original_img`,`a`.`click_count` FROM `tp_goods` `a` LEFT JOIN `tp_goods_category` `b` ON `a`.`cat_id`=b.id and b.cid=248 WHERE ( a.is_=1 and a.is_on_sale=1 and a.status=1 and a.cat_id= ) AND `a`.`cid` = '248' ORDER BY `a`.`sort` LIMIT 10
Database Config
type mysql
hostname 1.1.1.48
database manyshop
hostport 3306
dsn
params []
charset utf8
prefix tp_
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
db_log { "type": "mysql", "hostname": "61.142.254.80", "database": "accesslog", "username": "root", "password": "Xtidc.cn123", "hostport": "3306", "dsn": "", "params": [], "charset": "utf8", "prefix": "tp_", "debug": true, "deploy": 0, "rw_separate": false, "master_num": 1, "slave_no": "", "fields_strict": true, "resultset_type": "array", "auto_timestamp": false, "sql_explain": false }
db_gpmall { "type": "mysql", "hostname": "183.61.5.13", "database": "sourcedata", "username": "XTKJ", "password": "Xtkj@python", "hostport": "3306", "dsn": "", "params": [], "charset": "utf8", "prefix": "tp_", "debug": true, "deploy": 0, "rw_separate": false, "master_num": 1, "slave_no": "", "fields_strict": true, "resultset_type": "array", "auto_timestamp": false, "sql_explain": false }
icpmall { "type": "mysql", "hostname": "1.1.1.33", "database": "manyshop_icp", "username": "root", "password": "*h#DJ3LJj^jl@sDl(78$", "hostport": "3306", "dsn": "", "params": [], "charset": "utf8", "prefix": "tp_", "debug": true, "deploy": 0, "rw_separate": false, "master_num": 1, "slave_no": "", "fields_strict": true, "resultset_type": "array", "auto_timestamp": false, "sql_explain": false }
db_xtshell { "type": "mysql", "hostname": "1.1.1.24", "database": "xtshell", "username": "root", "password": "Xt123456!", "hostport": "3306", "dsn": "", "params": [], "charset": "utf8", "prefix": "", "debug": true, "deploy": 0, "rw_separate": false, "master_num": 1, "slave_no": "", "fields_strict": true, "resultset_type": "array", "auto_timestamp": false, "sql_explain": false }

Environment Variables

GET Data

c1Id
424
c2Id
425
POST Data
empty
Files
empty

Cookies

is_mobile
0

Session

think
{ "cid": "248", "firm_discount_rate": 1 }

Server/Request Data

USER
apache
HOME
/var/www
HTTP_HOST
pudengsi.com.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
REDIRECT_STATUS
200
SERVER_NAME
pudengsi.com.cn
SERVER_PORT
80
SERVER_ADDR
59.38.126.81
REMOTE_PORT
46406
REMOTE_ADDR
54.160.244.62
SERVER_SOFTWARE
nginx/1.14.2
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/usr/share/nginx/html/manyshop
DOCUMENT_URI
/index.php
REQUEST_URI
/index.php/Home/goods/getGoodsList/c1Id/424/c2Id/425.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/Home/goods/getGoodsList/c1Id/424/c2Id/425.html
PATH_TRANSLATED
/usr/share/nginx/html/manyshop
PATH_INFO
/Home/goods/getGoodsList/c1Id/424/c2Id/425.html
SCRIPT_FILENAME
/usr/share/nginx/html/manyshop/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710824450.3442
REQUEST_TIME
1710824450
Environment Variables
empty

ThinkPHP Constants

PLUGIN_PATH
/usr/share/nginx/html/manyshop/plugins/
UPLOAD_PATH
public/upload/
TPSHOP_CACHE_TIME
1
SITE_URL
http://pudengsi.com.cn
HTTP_HOST
pudengsi.com.cn
INSTALL_DATE
1463741583
IMAGE_DOMAIN
/
SERIALNUMBER
20160520065303oCWIoa
APP_PATH
/usr/share/nginx/html/manyshop/application/
NOW_TIME
1710824450
THINK_VERSION
5.0.15
THINK_START_TIME
1710824450.345
THINK_START_MEM
404592
EXT
.php
DS
/
THINK_PATH
/usr/share/nginx/html/manyshop/thinkphp/
LIB_PATH
/usr/share/nginx/html/manyshop/thinkphp/library/
CORE_PATH
/usr/share/nginx/html/manyshop/thinkphp/library/think/
TRAIT_PATH
/usr/share/nginx/html/manyshop/thinkphp/library/traits/
ROOT_PATH
/usr/share/nginx/html/manyshop/
EXTEND_PATH
/usr/share/nginx/html/manyshop/extend/
VENDOR_PATH
/usr/share/nginx/html/manyshop/vendor/
PUBLIC_PATH
/usr/share/nginx/html/manyshop/public/
RUNTIME_PATH
/usr/share/nginx/html/manyshop/runtime/pudengsi.com.cn/
LOG_PATH
/usr/share/nginx/html/manyshop/runtime/pudengsi.com.cn/log/
CACHE_PATH
/usr/share/nginx/html/manyshop/runtime/pudengsi.com.cn/cache/
TEMP_PATH
/usr/share/nginx/html/manyshop/runtime/pudengsi.com.cn/temp/
CONF_PATH
/usr/share/nginx/html/manyshop/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
DOMAIN
pudengsi.com.cn
IS_AJAX
false
IS_GET
true
IS_POST
false
MODULE_NAME
home
CONTROLLER_NAME
Goods
ACTION_NAME
getGoodsList
PREFIX
tp_
SESSION_ID
918c978f8c3d95953c7aabde874470ec