[10501] PDOException in Connection.php line 390

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 '-8,8' 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 390
  2. at Connection->query('SELECT * FROM `lzh46...', ['where_AND_is_show' => [1, 1], 'where_AND_typeid' => ['28', 1]], false, false) in Query.php line 248
  3. at Query->query('SELECT * FROM `lzh46...', ['where_AND_is_show' => [1, 1], 'where_AND_typeid' => ['28', 1]], false, false) in Query.php line 2476
  4. at Query->select() in Promanage.php line 75
  5. at Promanage->getsecproducts('good_hgjc', 'contact_us', ['is_show' => ['eq', 1]], 8, 'good_hgjc') in Products.php line 45
  6. at Products->index()
  7. at ReflectionMethod->invokeArgs(object(Products), []) in App.php line 343
  8. at App::invokeMethod([object(Products), 'index'], []) in App.php line 611
  9. at App::module(['index', 'Products', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  10. at App::exec(['type' => 'module', 'module' => ['index', 'Products', 'index'], 'convert' => false], ['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('/data/home/qxu160830...') in index.php line 29

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 '-8,8' 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 '-8,8' at line 1
Error SQL SELECT * FROM `lzh46_products` WHERE `is_show` = 1 AND `typeid` = 28 ORDER BY `num` ASC,`dates` DESC,`id` DESC LIMIT -8,8
Database Config
type mysql
hostname qdm646591576.my3w.com
database qdm646591576_db
hostport 3306
dsn
params []
charset utf8
prefix lzh46_
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 Y-m-d H:i:s
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

DOCUMENT_ROOT
/usr/home/qxu1608300049/htdocs
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
*/*
HTTP_HOST
cinsos-hy.com
HTTP_USER_AGENT
claudebot
PATH
/bin:/usr/bin
PHPRC
/var/www/php55/hichina_ini/qxu1608300049
QUERY_STRING
REDIRECT_DOCUMENT_ROOT
/usr/home/qxu1608300049/htdocs
REDIRECT_GATEWAY_INTERFACE
CGI/1.1
REDIRECT_HTTP_ACCEPT
*/*
REDIRECT_HTTP_HOST
cinsos-hy.com
REDIRECT_HTTP_USER_AGENT
claudebot
REDIRECT_PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
REDIRECT_PATH_INFO
/page/contact_us.html
REDIRECT_PATH_TRANSLATED
redirect:/index.php/page/contact_us.html/contact_us.html
REDIRECT_QUERY_STRING
REDIRECT_REMOTE_ADDR
54.81.33.119
REDIRECT_REMOTE_PORT
36330
REDIRECT_REQUEST_METHOD
GET
REDIRECT_REQUEST_URI
/good_hgjc/page/contact_us.html
REDIRECT_SCRIPT_FILENAME
/usr/home/qxu1608300049/htdocs/good_hgjc
REDIRECT_SCRIPT_NAME
/good_hgjc
REDIRECT_SERVER_ADDR
139.129.147.106
REDIRECT_SERVER_ADMIN
webmaster@qxu1608300049.my3w.com
REDIRECT_SERVER_NAME
cinsos-hy.com
REDIRECT_SERVER_PORT
80
REDIRECT_SERVER_PROTOCOL
HTTP/1.1
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE
Apache
REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
ZgVB6wofRY0AABKGMM4AAAAF
REDIRECT_URL
/good_hgjc/page/contact_us.html
REMOTE_ADDR
54.81.33.119
REMOTE_PORT
36330
REQUEST_METHOD
GET
REQUEST_URI
/good_hgjc/page/contact_us.html
SCRIPT_FILENAME
/usr/home/qxu1608300049/htdocs/index.php
SCRIPT_NAME
/index.php
SERVER_ADDR
139.129.147.106
SERVER_ADMIN
webmaster@qxu1608300049.my3w.com
SERVER_NAME
cinsos-hy.com
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
UNIQUE_ID
ZgVB6wofRY0AABKGMM4AAAAF
ORIG_PATH_INFO
/good_hgjc/page/contact_us.html
ORIG_PATH_TRANSLATED
/usr/home/qxu1608300049/htdocs/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711620587.9833
REQUEST_TIME
1711620587
PATH_INFO
/good_hgjc/page/contact_us.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/data/home/qxu1608300049/htdocs/Home/
CONF_PATH
/data/home/qxu1608300049/htdocs/Common/
APP_DEBUG
false
RUNTIME_PATH
./Home/Temp/
APP_NAMESPACE
Home
BIND_MODULE
index
EXTEND_PATH
./extend/
THINK_VERSION
5.0.20
THINK_START_TIME
1711620587.9838
THINK_START_MEM
248168
EXT
.php
DS
/
THINK_PATH
/data/home/qxu1608300049/htdocs/thinkphp/
LIB_PATH
/data/home/qxu1608300049/htdocs/thinkphp/library/
CORE_PATH
/data/home/qxu1608300049/htdocs/thinkphp/library/think/
TRAIT_PATH
/data/home/qxu1608300049/htdocs/thinkphp/library/traits/
ROOT_PATH
/data/home/qxu1608300049/htdocs/
VENDOR_PATH
/data/home/qxu1608300049/htdocs/vendor/
LOG_PATH
./Home/Temp/log/
CACHE_PATH
./Home/Temp/cache/
TEMP_PATH
./Home/Temp/temp/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
MODULE_NAME
index
CONTROLLER_NAME
Products
ACTION_NAME
index