Solved

MySQL Text field limit?

Posted on 2007-03-29
4
1,732 Views
Last Modified: 2007-12-19
I'm using Apache 2.0.59 and PHP 5.2.1, and connecting to a MySQL 4.1 database
using PDO.

My problem is, I'm trying to write to a text column in a table and then
read it back out, and somewhere along the way my data gets truncated to
64K. It appears that the data is in the text column correctly but I can't
be certain.

Any idea what might be causing this?


0
Comment
Question by:yodercm
  • 2
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
gamebits earned 500 total points
Comment Utility
Today’s scary discovery: MySQL TEXT fields have a limit of 65,000 bytes. If you insert anything larger than that in to a normal TEXT field mySQL will silently truncate your data without telling you (meaning software checks are probably a good idea). MEDIUMTEXT will store 16 million characters and LONGTEXT can handle over 4 trillion, but this information does not appear to be readily available in the online mySQL manual (although it is hinted at in this table). Something to bare in mind when designing database applications.

From

http://simonwillison.net/2002/Aug/1/mysqlTextLimits/
0
 
LVL 27

Author Comment

by:yodercm
Comment Utility
Never mind, I found the answer, but this system won't let me delete the question.
0
 
LVL 27

Author Comment

by:yodercm
Comment Utility
LOL OK, gamebits, you get the points for speed :)))
0
 
LVL 28

Expert Comment

by:gamebits
Comment Utility
Thanks for the points and the grade, but you can asked a moderator to delete the question, I would not opposed.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now