错误语句:INSERT INTO `tp_goods_visit_statistics` (`user_id` , `goods_id` , `visittime` , `cat_id` , `channel` , `extend_cat_id`) VALUES (:data__user_id , NULL , :data__visittime , NULL , :data__channel , NULL)
System Error
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'goods_id' cannot be null
$this->debug(false);
$this->numRows = $this->PDOStatement->rowCount();
return $this->numRows;
} catch (\PDOException $e) {
if ($this->isBreak($e)) {
return $this->close()->execute($sql, $bind);
}
echo '错误语句:'. $sql;
throw new PDOException($e, $this->config, $this->getLastsql());
} catch (\Throwable $e) {
if ($this->isBreak($e)) {
return $this->close()->execute($sql, $bind);
}
echo '错误语句:'. $sql;
throw $e;
} catch (\Exception $e) {
if ($this->isBreak($e)) {
return $this->close()->execute($sql, $bind);
Call Stack
- in Connection.php line 463
-
at Connection->execute('INSERT INTO `tp_good...', ['data__user_id' => [0, 1], 'data__visittime' => [1785663121, 1], 'data__channel' => [1, 1]]) in Query.php line 241
-
at Query->execute('INSERT INTO `tp_good...', ['data__user_id' => [0, 1], 'data__visittime' => [1785663121, 1], 'data__channel' => [1, 1]]) in Query.php line 2095
-
at Query->insert(['user_id' => 0, 'goods_id' => null, 'visittime' => 1785663121, ...]) in Query.php line 2907
-
at Query->add(['user_id' => 0, 'goods_id' => null, 'visittime' => 1785663121, ...]) in GoodsLogic.php line 665
-
at GoodsLogic->add_visit_log(0, null, 1) in Goods.php line 56
-
at Goods->goodsInfo()
-
at ReflectionMethod->invokeArgs(object(Goods), []) in App.php line 346
-
at App::invokeMethod([object(Goods), 'goodsInfo'], []) in App.php line 614
-
at App::module(['Home', 'Goods', 'goodsInfo'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 459
-
at App::exec(['type' => 'module', 'module' => ['Home', 'Goods', 'goodsInfo']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 142
-
at App::run() in start.php line 19
-
at require('/web/xenshop/thinkph...') in index.php line 123
Exception Datas
PDO Error Info
| SQLSTATE |
23000 |
| Driver Error Code |
1048 |
| Driver Error Message |
Column 'goods_id' cannot be null |
Database Status
| Error Code |
10501 |
| Error Message |
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'goods_id' cannot be null |
| Error SQL |
INSERT INTO `tp_goods_visit_statistics` (`user_id` , `goods_id` , `visittime` , `cat_id` , `channel` , `extend_cat_id`) VALUES (0 , NULL , 1785663121 , NULL , 1 , NULL) |
Database Config
| type |
mysql |
| hostname |
rm-wz92b11mc4ej0s0j1.mysql.rds.aliyuncs.com |
| database |
xenshop |
| hostport |
3306 |
| dsn |
|
| params |
[] |
| charset |
utf8 |
| prefix |
tp_ |
| debug |
false |
| 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
Server/Request Data
HTTP_HOST
shop.xencelabs.com.cn
HTTP_ACCEPT_ENCODING
gzip, br, zstd, deflate
HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
PATH_INFO
Home/Goods/goodsInfo/id/19.html
PHP_ADMIN_VALUE
open_basedir=/home/wwwroot/default:/web/:/tmp/:/proc/
SERVER_NAME
shop.xencelabs.com.cn
SERVER_ADDR
192.168.0.231
REMOTE_ADDR
216.73.217.172
SERVER_SOFTWARE
nginx/1.14.0
GATEWAY_INTERFACE
CGI/1.1
DOCUMENT_ROOT
/web/xenshop
REQUEST_URI
/Home/Goods/goodsInfo/id/19.html
QUERY_STRING
s=Home/Goods/goodsInfo/id/19.html
SCRIPT_FILENAME
/web/xenshop/index.php
REQUEST_TIME_FLOAT
1785663121.7882
Environment Variables
empty
ThinkPHP Constants
PLUGIN_PATH
/web/xenshop/plugins/
UPLOAD_PATH
public/upload/
TPSHOP_CACHE_TIME
31104000
SITE_URL
https://shop.xencelabs.com.cn
SERIALNUMBER
20160520065303oCWIoa
APP_PATH
/web/xenshop/application/
THINK_START_TIME
1785663121.7889
THINK_PATH
/web/xenshop/thinkphp/
LIB_PATH
/web/xenshop/thinkphp/library/
CORE_PATH
/web/xenshop/thinkphp/library/think/
TRAIT_PATH
/web/xenshop/thinkphp/library/traits/
EXTEND_PATH
/web/xenshop/extend/
VENDOR_PATH
/web/xenshop/vendor/
RUNTIME_PATH
/web/xenshop/runtime/
LOG_PATH
/web/xenshop/runtime/log/
CACHE_PATH
/web/xenshop/runtime/cache/
TEMP_PATH
/web/xenshop/runtime/temp/
CONF_PATH
/web/xenshop/application/
ADDON_PATH
/web/xenshop/addons/
ThinkPHP
V5.0.15
{ 十年磨一剑-为API开发设计的高性能框架 }