[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 'index ) AND `type` = ? ) AND `icns_article`.`deletetime` IS NULL ORDER BY `id` ' 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 `icns_...', ['where_AND_type' => ['21', 2]], false, false) in Query.php line 255
  3. at Query->query('SELECT * FROM `icns_...', ['where_AND_type' => ['21', 2]], false, false) in Query.php line 2686
  4. at Query->find() in Investment.php line 77
  5. at Investment->getDataArticle('21', 'index') in Investment.php line 60
  6. at Investment->details('21', 'index')
  7. at ReflectionMethod->invokeArgs(object(Investment), ['21', 'index']) in App.php line 343
  8. at App::invokeMethod([object(Investment), 'details'], []) in App.php line 611
  9. at App::module(['index', 'investment', 'details'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  10. at App::exec(['type' => 'module', 'module' => ['index', 'investment', 'details']], ['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/www.gz-...') 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 'index ) AND `type` = ? ) AND `icns_article`.`deletetime` IS NULL ORDER BY `id` ' 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 ) AND `type` = ? ) AND `icns_article`.`deletetime` IS NULL ORDER BY `id` ' at line 1
Error SQL SELECT * FROM `icns_article` WHERE ( ( id>index ) AND `type` = '21' ) AND `icns_article`.`deletetime` IS NULL ORDER BY `id` ASC LIMIT 1
Database Config
type mysql
hostname 106.53.34.66
database www_gz_sanli_com
hostport 3306
dsn
params []
charset utf8mb4
prefix icns_
debug false
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 false
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

GET Data
empty
POST Data
empty
Files
empty

Cookies

PHPSESSID
bihucafio5oqlh6dqqmfiq667l
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_COOKIE
PHPSESSID=bihucafio5oqlh6dqqmfiq667l
HTTP_ACCEPT_ENCODING
gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.gz-sanli.com
HTTP_USER_AGENT
Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)
PATH_INFO
/index/investment/details/ids/15/id/index/about/recruit/ids/21.html
REDIRECT_STATUS
200
SERVER_NAME
www.gz-sanli.com
SERVER_PORT
443
SERVER_ADDR
172.16.0.3
REMOTE_PORT
52712
REMOTE_ADDR
23.231.76.74
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/www.gz-sanli.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
//index/investment/details/ids/15/id/index/about/recruit/ids/21.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/index/investment/details/ids/15/id/index/about/recruit/ids/21.html
SCRIPT_FILENAME
/www/wwwroot/www.gz-sanli.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1666086885.885
REQUEST_TIME
1666086885
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.gz-sanli.com/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1666086885.8854
THINK_START_MEM
368752
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.gz-sanli.com/thinkphp/
LIB_PATH
/www/wwwroot/www.gz-sanli.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.gz-sanli.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.gz-sanli.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.gz-sanli.com/
EXTEND_PATH
/www/wwwroot/www.gz-sanli.com/extend/
VENDOR_PATH
/www/wwwroot/www.gz-sanli.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.gz-sanli.com/runtime/
LOG_PATH
/www/wwwroot/www.gz-sanli.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.gz-sanli.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.gz-sanli.com/runtime/temp/
CONF_PATH
/www/wwwroot/www.gz-sanli.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
PHP_OS_FAMILY
Linux
ADDON_PATH
/www/wwwroot/www.gz-sanli.com/addons/
XML 地图