homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Question about MySQL Blobs
Allen Graves

Msg#: 4171477 posted 1:11 pm on Jul 16, 2010 (gmt 0)

I have an "out of the box" CMS that I use for an article repository.

One of the fields in the database is a TINYBLOB field. It is currently storing the users' bio.

The problem is that it only stores a "tiny" bit of info and conveniently chops off anything after that.

I would like to let the users have more than a couple of lines for their bio!

Can I simply change the database column setting to "BLOB" or will that screw everything up?


p.s. I've already made a backup of the database. :-)



WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4171477 posted 4:23 pm on Jul 16, 2010 (gmt 0)

Is the data for the bio all text data?

Seems like changing it to text might be more efficient, if not more efficient, certainly more appropriate. At any rate, bolb and text are the same lengths.

A BLOB is a binary large object that can hold a variable amount of data. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB. These differ only in the maximum length of the values they can hold. The four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These correspond to the four BLOB types and have the same maximum lengths and storage requirements.

Manual [dev.mysql.com]

To answer the question, I imagine it wouldn't create any catastrophes, it would just allocate more space in the table. The inverse, of course, wouldn't be true and would truncate data.

Allen Graves

Msg#: 4171477 posted 8:32 pm on Jul 16, 2010 (gmt 0)

Thanks - yea, it's just text and html (links, lists, etc...).

I'll give it a shot this weekend.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved