mysql- Mysql2 :: Error:数据太长,第1行的列'description' [英] mysql- Mysql2::Error: Data too long for column 'description' at row 1

查看:155
本文介绍了mysql- Mysql2 :: Error:数据太长,第1行的列'description'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个刮板,它似乎不喜欢我的描述长度.我将列更改为varchar(500),但没有骰子.我想我需要转换为文本,但是我不确定该怎么做.就我而言,这有意义吗?谢谢!

I built a scraper and it doesn't seem to like my description length. I altered the column to varchar(500) but no dice. I think I need to convert to text, but I am not sure how to. Does that make sense in my case? Thanks!

错误-

Mysql2 :: Error:数据太长,无法在第1行的列'description'插入sammiches(countrycreated_atdescriptionimagenameupdated_at) VALUES('Italy','2013-05-03 01:10:08','在意大利,panino是指用切片面包以外的面包制成的三明治的单词,在这种情况下,意大利人称其为tramezzino或porco.所使用的面包类型包括ciabatta,rosetta和法式长棍面包.将面包水平切开并装满熟食成分,例如萨拉米香肠,火腿,奶酪,熟香肠或其他食物,有时在被加热的烤架压紧后才变热.在美国,英国和加拿大,帕尼尼"一词已被用来指压制和烤制的三明治;三明治压制机(通常称为帕尼尼压制机"或烤制三明治机")的使用和使用广泛. ','/wiki/File:Italian_Sandwich.jpeg','Panini','2013-05-03 01:10:08')(ActiveRecord :: StatementInvalid)

Mysql2::Error: Data too long for column 'description' at row 1: INSERT INTO sammiches (country, created_at, description, image, name, updated_at) VALUES ('Italy', '2013-05-03 01:10:08', 'In Italy, panino is the word for a sandwich made from bread other than sliced bread, in which case Italians call it a tramezzino or porco. Examples of bread types used are ciabatta, rosetta and baguette. The bread is cut horizontally and filled with deli ingredients such as salami, ham, cheese, mortadella, or other food, and sometimes served warm after having been pressed by a warming grill. In the United States, United Kingdom and Canada, the term panini has been adopted to refer to a pressed and toasted sandwich; there is widespread availability and use of sandwich presses, often known as \"panini presses\" or \"toasted sandwich makers.\"', '/wiki/File:Italian_Sandwich.jpeg', 'Panini', '2013-05-03 01:10:08') (ActiveRecord::StatementInvalid)

推荐答案

您的长度现在约为650个字符.尝试增加更多.

Your length is about 650 characters now. Try to increase more.

这篇关于mysql- Mysql2 :: Error:数据太长,第1行的列'description'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆