[10501] PDOException in Connection.php line 687

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 `functionid` = ORDER BY `addtime` ASC LIMIT 1' at line 1

  1. $this->debug(false, '', $master);
  2. // 返回结果集
  3. return $this->getResult($pdo, $procedure);
  4. } catch (\PDOException $e) {
  5. if ($this->isBreak($e)) {
  6. return $this->close()->query($sql, $bind, $master, $pdo);
  7. }
  8. throw new PDOException($e, $this->config, $this->getLastsql());
  9. } catch (\Throwable $e) {
  10. if ($this->isBreak($e)) {
  11. return $this->close()->query($sql, $bind, $master, $pdo);
  12. }
  13. throw $e;
  14. } catch (\Exception $e) {
  15. if ($this->isBreak($e)) {
  16. return $this->close()->query($sql, $bind, $master, $pdo);

Call Stack

  1. in Connection.php line 687
  2. at Connection->query('SELECT * FROM `natur...', [], false, false) in Connection.php line 844
  3. at Connection->find(object(Query)) in Query.php line 3130
  4. at Query->find() in News.php line 1421
  5. at News->ndetail(object(Request))
  6. at ReflectionMethod->invokeArgs(object(News), [object(Request)]) in Container.php line 395
  7. at Container->invokeReflectMethod(object(News), object(ReflectionMethod), []) in Module.php line 132
  8. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  9. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  10. at Middleware->think\{closure}(object(Request))
  11. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  12. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  13. at Module->exec() in Dispatch.php line 168
  14. at Dispatch->run() in App.php line 432
  15. at App->think\{closure}(object(Request), object(Closure), null)
  16. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  17. at Middleware->think\{closure}(object(Request))
  18. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  19. at Middleware->dispatch(object(Request)) in App.php line 435
  20. at App->run() in index.php line 23

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 `functionid` = ORDER BY `addtime` ASC 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 'AND `functionid` = ORDER BY `addtime` ASC LIMIT 1' at line 1
Error SQL SELECT * FROM `nature_news` WHERE `addtime` > AND `functionid` = ORDER BY `addtime` ASC LIMIT 1
Database Config
type mysql
hostname hdm721911219.my3w.com
database hdm721911219_db
hostport 3306
dsn
params []
charset utf8
prefix nature_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
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
break_match_str []

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
DOCUMENT_ROOT /usr/home/hyu8122590001/htdocs
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_CONNECTION Keep-Alive
HTTP_HOST jsqcjsxy.com
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
PATH /bin
PHPRC /var/www/php71/hichina_ini/hyu8122590001
QUERY_STRING
REDIRECT_DOCUMENT_ROOT /usr/home/hyu8122590001/htdocs
REDIRECT_GATEWAY_INTERFACE CGI/1.1
REDIRECT_HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
REDIRECT_HTTP_ACCEPT_ENCODING br,gzip
REDIRECT_HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
REDIRECT_HTTP_CONNECTION Keep-Alive
REDIRECT_HTTP_HOST jsqcjsxy.com
REDIRECT_HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
REDIRECT_PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REDIRECT_PATH_INFO home/news/ndetail.html
REDIRECT_PATH_TRANSLATED redirect:/index.php/ndetail.html
REDIRECT_QUERY_STRING
REDIRECT_REMOTE_ADDR 3.239.50.33
REDIRECT_REMOTE_PORT 42732
REDIRECT_REQUEST_METHOD GET
REDIRECT_REQUEST_URI /home/news/ndetail.html
REDIRECT_SCRIPT_FILENAME /usr/home/hyu8122590001/htdocs/home
REDIRECT_SCRIPT_NAME /home
REDIRECT_SERVER_ADDR 10.17.26.113
REDIRECT_SERVER_ADMIN webmaster@hyu8122590001.my3w.com
REDIRECT_SERVER_NAME jsqcjsxy.com
REDIRECT_SERVER_PORT 80
REDIRECT_SERVER_PROTOCOL HTTP/1.1
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE Apache
REDIRECT_STATUS 200
REDIRECT_TZ Asia/Shanghai
REDIRECT_UNIQUE_ID YWnWfwoRGnEALGdv@4AAAAAR
REDIRECT_URL /home/news/ndetail.html
REMOTE_ADDR 3.239.50.33
REMOTE_PORT 42732
REQUEST_METHOD GET
REQUEST_URI /home/news/ndetail.html
SCRIPT_FILENAME /usr/home/hyu8122590001/htdocs/index.php
SCRIPT_NAME /index.php
SERVER_ADDR 10.17.26.113
SERVER_ADMIN webmaster@hyu8122590001.my3w.com
SERVER_NAME jsqcjsxy.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
TZ Asia/Shanghai
UNIQUE_ID YWnWfwoRGnEALGdv@4AAAAAR
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1634326143.5048
REQUEST_TIME 1634326143
Environment Variablesempty
ThinkPHP Constants
APP_PATH /usr/home/hyu8122590001/htdocs
CHAO_URL
systemname 扬州汽车技师学院