我在将字段保存到数据库时出错,这给了我错误:字符串数据,右截断:1406 对于第 1 行的列“内容”来说数据太长。
但是数据库中的字段设置为类型:字符串,长度 191。我相信这会转换为 varchar。
还有人有这个吗?
最佳答案
https://stackoverflow.com/a/13182846/2693543
复制上面的答案
VARCHAR(X) Case: user name, email, country, subject, password
TEXT Case: messages, emails, comments, formatted text, html, code, images, links
MEDIUMTEXT Case: large json bodies, short to medium length books, csv strings
LONGTEXT Case: textbooks, programs, years of logs files, harry potter and the goblet of fire, scientific research logging
关于mysql - 10 月 CMS - 第 1 行的 'content' 列的数据太长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51918416/