向mysql插入数据的时候,出现异常

WBOY
Release: 2016-06-13 13:37:15
Original
822 people have browsed it

向mysql插入数据的时候,出现错误
ERROR 1406 (22001): Data too long for column 'article_body' at row 1  

近期自己动手做个个人博客,我向数据库里插入了一篇文章,结果由于文章字数太长,导致插入失败。

如果可以用mysql插入大量字符的怎么解决。

如果不需要用数据库插入文章,是否有其他的方法呢?别个 博客发表文章,又是存在哪个地方,是数据库么



问题有点多,多多指教

------解决方案--------------------
修改字段 为text 类型

不使用数据库那就直接保存成文本文件.但是不利于检索和修改

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!