[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 ') ORDER BY `id` ASC' 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 `clien...', [], false, false) in Query.php line 248
  3. at Query->query('SELECT * FROM `clien...', [], false, false) in Query.php line 2476
  4. at Query->select() in Product.php line 160
  5. at Product->detail()
  6. at ReflectionMethod->invokeArgs(object(Product), []) in App.php line 343
  7. at App::invokeMethod([object(Product), 'detail'], []) in App.php line 610
  8. at App::module(['home', 'Product', 'detail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => ['home', 'Product', 'detail']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  10. at App::run() in start.php line 19
  11. at require('/www/wwwroot/www.jus...') in index.php line 18

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' 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' at line 1
Error SQL SELECT * FROM `client_productdescription` WHERE ( pro_id = ) ORDER BY `id` ASC
Database Config
type mysql
hostname 127.0.0.1
database sql_www_justtide
hostport 3306
dsn
params []
charset utf8
prefix client_
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

first
1711639419
think_var1
en-us
ipInfo
a:5:{s:2:"id";i:648;s:8:"ip_start";s:8:"51118080";s:6:"ip_end";s:8:"57147391";s:12:"abbreviation";s:2:"US";s:7:"country";s:13:"United States";}
Session
empty

Server/Request Data

USER
www
HOME
/home/www
SCRIPT_NAME
/index.php
REQUEST_URI
/product/001.html
QUERY_STRING
s=/home/Product/detail/name/001
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/2.0
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
s=/home/Product/detail/name/001
REDIRECT_URL
/index.php/product/001.html
REMOTE_PORT
32796
SCRIPT_FILENAME
/www/wwwroot/www.justtide.com/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/www.justtide.com/
CONTEXT_PREFIX
REQUEST_SCHEME
https
DOCUMENT_ROOT
/www/wwwroot/www.justtide.com/
REMOTE_ADDR
3.80.129.195
SERVER_PORT
443
SERVER_ADDR
172.31.27.248
SERVER_NAME
www.justtide.com
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at www.justtide.com Port 443</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_HOST
www.justtide.com
HTTP_REFERER
http://www.justtide.com/product/001.html
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
proxy-nokeepalive
1
H2_STREAM_TAG
145-3
H2_STREAM_ID
3
H2_PUSHED_ON
H2_PUSHED
H2_PUSH
off
H2PUSH
off
HTTP2
on
SSL_TLS_SNI
www.justtide.com
HTTPS
on
SCRIPT_URI
https://www.justtide.com/product/001.html
SCRIPT_URL
/product/001.html
REDIRECT_STATUS
200
REDIRECT_H2_STREAM_TAG
145-3
REDIRECT_H2_STREAM_ID
3
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSH
off
REDIRECT_H2PUSH
off
REDIRECT_HTTP2
on
REDIRECT_SSL_TLS_SNI
www.justtide.com
REDIRECT_HTTPS
on
REDIRECT_SCRIPT_URI
https://www.justtide.com/product/001.html
REDIRECT_SCRIPT_URL
/product/001.html
REDIRECT_REDIRECT_STATUS
200
REDIRECT_REDIRECT_H2_STREAM_TAG
145-3
REDIRECT_REDIRECT_H2_STREAM_ID
3
REDIRECT_REDIRECT_H2_PUSHED_ON
REDIRECT_REDIRECT_H2_PUSHED
REDIRECT_REDIRECT_H2_PUSH
off
REDIRECT_REDIRECT_H2PUSH
off
REDIRECT_REDIRECT_HTTP2
on
REDIRECT_REDIRECT_SSL_TLS_SNI
www.justtide.com
REDIRECT_REDIRECT_HTTPS
on
REDIRECT_REDIRECT_SCRIPT_URI
https://www.justtide.com/product/001.html
REDIRECT_REDIRECT_SCRIPT_URL
/product/001.html
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711639419.7569
REQUEST_TIME
1711639419
PATH_INFO
/home/Product/detail/name/001
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.justtide.com/application/
APP_DEBUG
true
THINK_VERSION
5.0.21
THINK_START_TIME
1711639419.7574
THINK_START_MEM
405224
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.justtide.com/thinkphp/
LIB_PATH
/www/wwwroot/www.justtide.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.justtide.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.justtide.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.justtide.com/
EXTEND_PATH
/www/wwwroot/www.justtide.com/extend/
VENDOR_PATH
/www/wwwroot/www.justtide.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.justtide.com/runtime/
LOG_PATH
/www/wwwroot/www.justtide.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.justtide.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.justtide.com/runtime/temp/
CONF_PATH
/www/wwwroot/www.justtide.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false