mysql - 发生数据库错误错误号:1048 列'captcha_time'不能为空
问题描述
请帮助删除以下错误
A Database Error Occurred
Error Number: 1048
Column 'captcha_time' cannot be null
INSERT INTO `captcha_table` (`captcha_time`, `captcha_ip_address`, `captcha_word`) VALUES (NULL, '27.60.102.123', NULL)
Filename: models/dashboard/Common_model.php
Line Number: 13
解决方案
您正在尝试将 NULL 插入到 captcha_time 列中,如果您在其中添加一个值,它将修复它,但是您的问题并没有让我清楚地了解它,而且如果您在 captcha_table 上禁用 NOT NULL 约束,您将能够在其中插入空值captcha_time,你应该分析什么对你来说是正确的。
INSERT INTO `captcha_table` (`captcha_time`, `captcha_ip_address`, `captcha_word`) VALUES (1234, '27.60.102.123', NULL)
推荐阅读
- php - 在php中替换postgres存储过程
- python - 具有 RGB 颜色的 Python 散点图
- r - 下载包“drc”时出错。关于如何解决这个问题的任何建议,或类似包的推荐?
- css - BS 5 carousel How to Add a specific bg-color in the carousel-control button for the inactive item?
- r - Tidymodels - 如何在 control = control_grid 中正确使用 verbose = TRUE
- reactjs - react-gocoding returns [object Promise]
- flutter - 如何在 Mac 上打开隐藏的 .bash_profile 文件?
- c# - 用于 jquery CRUD 的 Asp.net core mvc + kendo ui
- excel - 添加时如何在Power Query中命名查询?
- python - 使用 Python 使用 Twitter API 引用推文