MySQL column for 500 characters storage

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Calimero
Forum Contributor
Posts: 310
Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way

MySQL column for 500 characters storage

Post by Calimero »

Can anyone tell me which type of column in MySQL table should I declare for storing 500 alfanumeric characters.

It will be used in Forum type applications - with PHP and Apache.

So speed and safety ( generaly)


Thanks Ahead !
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

http://dev.mysql.com/doc/mysql/en/column-types.html

try looking at the manual next time.
User avatar
Calimero
Forum Contributor
Posts: 310
Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way

...

Post by Calimero »

Well, I did - several times in the past.

But half of those I don't understand, and the other half I use - but am still not sure what the writer wanted to say.


So I was hoping for just a quick tip - of the type of column, nothing more.



Thanks ahead !
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

well... you'll need a string-like type. So that's VARCHAR, CHAR, TEXT, MEDIUMTEXT, LONGTEXT, and TINYTEXT.. look at the storage capacity of each one.
Post Reply