:(
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'post' at row 1
错误位置
FILE: D:\www\ThinkPHP\Library\Think\Db\Driver.class.php LINE: 217
TRACE
#0 D:\www\ThinkPHP\Library\Think\Db\Driver.class.php(217): PDOStatement->execute()
#1 D:\www\ThinkPHP\Library\Think\Db\Driver.class.php(813): Think\Db\Driver->execute('INSERT INTO `se...', false)
#2 D:\www\ThinkPHP\Library\Think\Model.class.php(320): Think\Db\Driver->insert(Array, Array, false)
#3 D:\www\ThinkPHP\Library\Org\Util\Tool.class.php(34): Think\Model->add(Array)
#4 D:\www\Distribution\Admin\Controller\MaterialController.class.php(18): Tool->operationLog(Array)
#5 D:\www\ThinkPHP\Common\functions.php(681): Admin\Controller\MaterialController->__construct()
#6 D:\www\ThinkPHP\Library\Think\App.class.php(89): controller('Material', '')
#7 D:\www\ThinkPHP\Library\Think\App.class.php(202): Think\App::exec()
#8 D:\www\ThinkPHP\Library\Think\Think.class.php(120): Think\App::run()
#9 D:\www\ThinkPHP\ThinkPHP.php(97): Think\Think::start()
#10 D:\www\index.php(30): require('D:\\www\\ThinkPHP...')
#11 {main}
ThinkPHP3.2.3 { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'post' at row 1
错误位置
FILE: D:\www\ThinkPHP\Library\Think\Db\Driver.class.php LINE: 217
TRACE
#0 D:\www\ThinkPHP\Library\Think\Db\Driver.class.php(217): PDOStatement->execute()
#1 D:\www\ThinkPHP\Library\Think\Db\Driver.class.php(813): Think\Db\Driver->execute('INSERT INTO `se...', false)
#2 D:\www\ThinkPHP\Library\Think\Model.class.php(320): Think\Db\Driver->insert(Array, Array, false)
#3 D:\www\ThinkPHP\Library\Org\Util\Tool.class.php(34): Think\Model->add(Array)
#4 D:\www\Distribution\Admin\Controller\MaterialController.class.php(18): Tool->operationLog(Array)
#5 D:\www\ThinkPHP\Common\functions.php(681): Admin\Controller\MaterialController->__construct()
#6 D:\www\ThinkPHP\Library\Think\App.class.php(89): controller('Material', '')
#7 D:\www\ThinkPHP\Library\Think\App.class.php(202): Think\App::exec()
#8 D:\www\ThinkPHP\Library\Think\Think.class.php(120): Think\App::run()
#9 D:\www\ThinkPHP\ThinkPHP.php(97): Think\Think::start()
#10 D:\www\index.php(30): require('D:\\www\\ThinkPHP...')
#11 {main}
ThinkPHP3.2.3 { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]
解决方案 »
- 常用的站点页面加载技术有哪些?
- PHP使用MSSQL2005数据库的效率高吗?跟MYSQL比
- php处理图片问题
- (北京)某外资B2C网站诚聘脚本工程师!
- 谁有PHP 的进度条的代码
- 经过再次反复测试,取得全局变量在[ ]中真的不用加单引号!请各位高手进来分析一下!! 版主大哥也请进来看看!!绝对不是无聊之举!!
- 为什么在PHP中连数据库时,会提示找不到mssql_pconnect这个函数呢?
- 一段代码在WINDOWS+PHP+MYSQL上运行正常,在LINUX下不正常
- 这样的问题有没有最简单的办法
- 为什么用汉字就不好用呢?
- php登入检测
- Warning: array_sum() [function.array-sum]: The argument should be an array in
字符串数据太长这是数据库在报错!请修改你的字段类型22001 是 SQL 标准错误号,1406 是 MySQL 错误号
字段类型是 longtext 字符集是 utf8mb4
public function doEditArticle(){
if (IS_POST) {
$table = M('article');
if ($table->save($_POST)) {
$this->success('修改成功');
} else {
$this->error('操作失败一:' . $table->getError());
} }
}