2

I am currently doing screen scraping and storing in to a MySQL database, I used some of my columns as answer_content varchar(255) NOT NULL,but the problem is some of the data is getting truncated, I was reading following blog post.

But I am not really sure if that is the solution: What is the best solution to save the text without getting them truncated? I am not doing this on a server side and currently doing on a person laptop.

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
add-semi-colons
  • 18,094
  • 55
  • 145
  • 232
  • 1
    Use `TEXT`. Or a bigger `VARCHAR`, like `VARCHAR(10000)`. – Ry- Sep 13 '12 at 02:29
  • Obviously a larger column count....why do you wonder that the text is truncsted when *you* specified 255 chars? Thinking helps. –  Sep 13 '12 at 02:57

2 Answers2

3

Change type to TEXT

Refer here: http://www.electrictoolbox.com/maximum-length-mysql-text-field-types/

karthikr
  • 97,368
  • 26
  • 197
  • 188
1

Change the column type to TEXT.

hjpotter92
  • 78,589
  • 36
  • 144
  • 183