Hey all,
I was wondering, for a web site that wants to store about seven fields, all containing 1,000 characters each, what type of variable (TEXT, LONGTEXT?) would I use with MySQL? For example, what does this forum use?
Thanks!
-BUMPle.
Textfield Database Storage!
Moderator: General Moderators
Correction a "TEXT" field allows 2^16 - 1 characters (65535... as does BLOB)
TINYTEXT allows only 2^8 - 1 (255) characters.
LONGTEXT allows 2^32 - 1 (approx 4G or 4294967295)
see http://www.mysql.com/doc/en/Column_types.html for more information.
So, my answer would be TEXT not LONGTEXT ( LONGTEXT can make the db slower )
TINYTEXT allows only 2^8 - 1 (255) characters.
LONGTEXT allows 2^32 - 1 (approx 4G or 4294967295)
see http://www.mysql.com/doc/en/Column_types.html for more information.
So, my answer would be TEXT not LONGTEXT ( LONGTEXT can make the db slower )