#0 [10501]PDOException in PDOConnection.php line 768

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 parent=0 ) ORDER BY `sort` DESC,`id` ASC' at line 1

                        
  1. return $this->PDOStatement;
  2. } catch (\Throwable | \Exception $e) {
  3. if ($this->reConnectTimes < 4 && $this->isBreak($e)) {
  4. ++$this->reConnectTimes;
  5. return $this->close()->getPDOStatement($sql, $bind, $master, $procedure);
  6. }
  7. if ($e instanceof \PDOException) {
  8. throw new PDOException($e, $this->config, $this->getLastsql());
  9. } else {
  10. throw $e;
  11. }
  12. }
  13. }
  14. /**
  15. * 执行语句
  16. * @access protected

Call Stack

  1. in PDOConnection.php line 768
  2. at PDOConnection->getPDOStatement('SELECT * FROM `ys_co...', [], false, false) in PDOConnection.php line 688
  3. at PDOConnection->pdoQuery(object(Query), 'SELECT * FROM `ys_co...') in PDOConnection.php line 886
  4. at PDOConnection->select(object(Query)) in BaseQuery.php line 1090
  5. at BaseQuery->select() in 8eba62eb5b78bf8e680304ad23a6cd4a.php line 61
  6. at include('/www/wwwroot/yousenj...') in File.php line 59
  7. at File->read('/www/wwwroot/yousenj...', ['controller' => 'free', 'parent' => ['id' => 7, 'parent' => 0, 'name' => '咨询工程师', ...], 'action' => 'free', ...]) in Template.php line 251
  8. at Template->fetch('/www/wwwroot/yousenj...', ['controller' => 'free', 'parent' => ['id' => 7, 'parent' => 0, 'name' => '咨询工程师', ...], 'action' => 'free', ...]) in Think.php line 149
  9. at Think->fetch('/www/wwwroot/yousenj...', ['controller' => 'free', 'parent' => ['id' => 7, 'parent' => 0, 'name' => '咨询工程师', ...], 'action' => 'free', ...]) in View.php line 90
  10. at View->think\{closure}() in View.php line 122
  11. at View->getContent(object(Closure)) in View.php line 91
  12. at View->fetch('/pc/topic_free_detai...', ['controller' => 'free', 'parent' => ['id' => 7, 'parent' => 0, 'name' => '咨询工程师', ...], 'action' => 'free', ...], false) in View.php line 90
  13. at View->output('/pc/topic_free_detai...') in Response.php line 385
  14. at Response->getContent() in Response.php line 131
  15. at Response->send() in SystemService.php line 337
  16. at SystemService->doInit() in index.php line 10

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 parent=0 ) ORDER BY `sort` DESC,`id` ASC' 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 parent=0 ) ORDER BY `sort` DESC,`id` ASC' at line 1
Error SQL SELECT * FROM `ys_course_free` WHERE ( status = 1 ) AND ( course_id= and parent=0 ) ORDER BY `sort` DESC,`id` ASC
Database Config
type mysql
hostname localhost
database yousenjiaoyu
hostport 3306
dsn
params []
charset utf8mb4
prefix
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
fields_cache false
trigger_sql true
builder
query
break_reconnect false
break_match_str []

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_HOST www.yousenjiaoyu.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.yousenjiaoyu.com
SERVER_PORT 443
SERVER_ADDR 172.24.211.10
REMOTE_PORT 45996
REMOTE_ADDR 18.232.169.110
SERVER_SOFTWARE nginx/1.18.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/yousenjiaoyu.com/public
DOCUMENT_URI /index.php
REQUEST_URI /zixun/shiting/29.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/zixun/shiting/29.html
SCRIPT_FILENAME /www/wwwroot/yousenjiaoyu.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711652286.7389
REQUEST_TIME 1711652286