[SOLVED] Need more then 255char. in database table

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Lucnet
Forum Commoner
Posts: 61
Joined: Sat Jun 26, 2004 5:28 pm
Location: Alabama
Contact:

Need more then 255char. in database table

Post by Lucnet »

I have created a table with this layout:

CREATE TABLE ls_testimonials (
id bigint(20) unsigned NOT NULL auto_increment,
client_id varchar(255) default NULL,
link_display varchar(255) default NULL,
company varchar(255) default NULL,
email varchar(255) default NULL,
testimonials varchar(255) default NULL,
approved enum('y','n','h') NOT NULL default 'n',
PRIMARY KEY (id)
) TYPE=MyISAM;

I am needing more then 255 charectors in the testimonials line. What is another function I can call on. When I try to change to a bigger number MySQL tells me it can't be done to use BLOB.

I am very new with MySQL and php. All help is appreciated.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

TEXT is the next size up text field.. 64K of text can be held: http://dev.mysql.com/doc/mysql/en/BLOB.html
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

There's also :
TINYBLOB, TINYTEXT
MEDIUMBLOB, MEDIUMTEXT
LONGBLOB, LONGTEXT

http://dev.mysql.com/doc/mysql/en/Stora ... ments.html
User avatar
Lucnet
Forum Commoner
Posts: 61
Joined: Sat Jun 26, 2004 5:28 pm
Location: Alabama
Contact:

Post by Lucnet »

Thanks
Post Reply