[10501] PDOException in Connection.php line 388

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 ')' at line 1

  1. $this->PDOStatement->execute();
  2. // 调试结束
  3. $this->debug(false);
  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 (\Exception $e) {
  12. if ($this->isBreak($e)) {
  13. return $this->close()->query($sql, $bind, $master, $pdo);
  14. }
  15. throw $e;
  16. }
  17. }
  18. /**

Call Stack

  1. in Connection.php line 388
  2. at Connection->query('SELECT * FROM `y_pro...', [], false, false) in Query.php line 227
  3. at Query->query('SELECT * FROM `y_pro...', [], false, false) in Query.php line 2343
  4. at Query->select() in Product.php line 25
  5. at Product->desc('1', '43')
  6. at ReflectionMethod->invokeArgs(object(Product), ['1', '43']) in App.php line 197
  7. at App::invokeMethod([object(Product), 'desc'], []) in App.php line 414
  8. at App::module(['wap', 'product', 'desc'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 296
  9. at App::exec(['type' => 'module', 'module' => ['wap', 'product', 'desc']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  10. at App::run() in start.php line 18
  11. at require('/www/web/m_kodear_cc...') in index.php line 5

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 ')' 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 ')' at line 1
Error SQL SELECT * FROM `y_product_gallery` WHERE ( pro_id= )
Database Config
type mysql
hostname localhost
database kodearm_db
hostport 21
dsn
params []
charset utf8
prefix y_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
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
empty
Session
empty

Server/Request Data

REDIRECT_STATUS
200
HTTP_HOST
m.kodear.com.cn
HTTP_X_REAL_IP
174.129.190.10
HTTP_CONNECTION
close
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
m.kodear.com.cn
SERVER_ADDR
127.0.0.1
SERVER_PORT
80
REMOTE_ADDR
174.129.190.10
DOCUMENT_ROOT
/www/web/m_kodear_cc/public_html
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/www/web/m_kodear_cc/public_html
SERVER_ADMIN
you@example.com
SCRIPT_FILENAME
/www/web/m_kodear_cc/public_html/index.php
REMOTE_PORT
35045
REDIRECT_URL
/wap/product/desc/cate_id/1/id/43.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.0
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/wap/product/desc/cate_id/1/id/43.html
SCRIPT_NAME
/index.php
PATH_INFO
/wap/product/desc/cate_id/1/id/43.html
PATH_TRANSLATED
redirect:/index.php/wap/product/desc/cate_id/1/id/43.html/product/desc/cate_id/1/id/43.html
PHP_SELF
/index.php/wap/product/desc/cate_id/1/id/43.html
REQUEST_TIME_FLOAT
1711706314.862
REQUEST_TIME
1711706314
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/web/m_kodear_cc/public_html/application/
THINK_VERSION
5.0.12
THINK_START_TIME
1711706314.8629
THINK_START_MEM
263208
EXT
.php
DS
/
THINK_PATH
/www/web/m_kodear_cc/public_html/thinkphp/
LIB_PATH
/www/web/m_kodear_cc/public_html/thinkphp/library/
CORE_PATH
/www/web/m_kodear_cc/public_html/thinkphp/library/think/
TRAIT_PATH
/www/web/m_kodear_cc/public_html/thinkphp/library/traits/
ROOT_PATH
/www/web/m_kodear_cc/public_html/
EXTEND_PATH
/www/web/m_kodear_cc/public_html/extend/
VENDOR_PATH
/www/web/m_kodear_cc/public_html/vendor/
RUNTIME_PATH
/www/web/m_kodear_cc/public_html/runtime/
LOG_PATH
/www/web/m_kodear_cc/public_html/runtime/log/
CACHE_PATH
/www/web/m_kodear_cc/public_html/runtime/cache/
TEMP_PATH
/www/web/m_kodear_cc/public_html/runtime/temp/
CONF_PATH
/www/web/m_kodear_cc/public_html/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
IS_CGI
0
_PHP_FILE_
/index.php
ROOT_URL
IS_AJAX
false
IS_GET
true
IS_POST
false
MODULE_NAME
wap
CONTROLLER_NAME
Product
ACTION_NAME
desc