[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 ') ORDER BY `id` 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 `w_cas...', ['ThinkBind_1_' => [0, 1], 'ThinkBind_2_' => [1, 1]], false, false) in Connection.php line 844
  3. at Connection->find(object(Query)) in Query.php line 3132
  4. at Query->find() in Anli.php line 65
  5. at Anli->info()
  6. at ReflectionMethod->invokeArgs(object(Anli), []) in Container.php line 395
  7. at Container->invokeReflectMethod(object(Anli), object(ReflectionMethod), ['id' => '43', 'convert' => false]) 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 22

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 ') ORDER BY `id` 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 ') ORDER BY `id` ASC LIMIT 1' at line 1
Error SQL SELECT * FROM `w_cases` WHERE `delete_time` = 0 AND `status` = 1 AND `cate_id` IS NULL AND ( id > ) ORDER BY `id` ASC LIMIT 1
Database Config
type mysql
hostname hdm721894539.my3w.com
database hdm721894539_db
hostport 3306
dsn
params []
charset utf8
prefix w_
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/hyu7299430001/htdocs
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT */*
HTTP_HOST www.wubrand.com
HTTP_USER_AGENT claudebot
PATH /bin
PHPRC /var/www/php56/hichina_ini/hyu7299430001
QUERY_STRING
REDIRECT_DOCUMENT_ROOT /usr/home/hyu7299430001/htdocs
REDIRECT_GATEWAY_INTERFACE CGI/1.1
REDIRECT_HTTP_ACCEPT */*
REDIRECT_HTTP_HOST www.wubrand.com
REDIRECT_HTTP_USER_AGENT claudebot
REDIRECT_PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REDIRECT_PATH_INFO /43
REDIRECT_PATH_TRANSLATED redirect:/index.php/43
REDIRECT_QUERY_STRING
REDIRECT_REMOTE_ADDR 54.89.70.161
REDIRECT_REMOTE_PORT 43428
REDIRECT_REQUEST_METHOD GET
REDIRECT_REQUEST_URI /brand-info/43
REDIRECT_SCRIPT_FILENAME /usr/home/hyu7299430001/htdocs/brand-info
REDIRECT_SCRIPT_NAME /brand-info
REDIRECT_SCRIPT_URI http://www.wubrand.com/brand-info/43
REDIRECT_SCRIPT_URL /brand-info/43
REDIRECT_SERVER_ADDR 10.21.85.202
REDIRECT_SERVER_ADMIN webmaster@hyu7299430001.my3w.com
REDIRECT_SERVER_NAME www.wubrand.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 ZgVp2goVVcoAPQ7EBcsAAAAB
REDIRECT_URL /brand-info/43
REMOTE_ADDR 54.89.70.161
REMOTE_PORT 43428
REQUEST_METHOD GET
REQUEST_URI /brand-info/43
SCRIPT_FILENAME /usr/home/hyu7299430001/htdocs/index.php
SCRIPT_NAME /index.php
SCRIPT_URI http://www.wubrand.com/brand-info/43
SCRIPT_URL /brand-info/43
SERVER_ADDR 10.21.85.202
SERVER_ADMIN webmaster@hyu7299430001.my3w.com
SERVER_NAME www.wubrand.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
TZ Asia/Shanghai
UNIQUE_ID ZgVp2goVVcoAPQ7EBcsAAAAB
ORIG_PATH_INFO /brand-info/43
ORIG_PATH_TRANSLATED /usr/home/hyu7299430001/htdocs/index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711630810.1634
REQUEST_TIME 1711630810
Environment Variablesempty
ThinkPHP Constants
APP_PATH /usr/home/hyu7299430001/htdocs/app/