Large amounts of text in mysql

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
meander
Forum Commoner
Posts: 26
Joined: Sun Oct 10, 2004 3:09 pm

Large amounts of text in mysql

Post by meander »

I have to post the text in a textarea to the dbase, so is it better to make a text field in the dbase, or have it written in a text file and then just put the link to the file in the dbase?
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Depends on how much text there is take a look at the database manual to see how much data each field type can hold. Usually TEXT or BLOB are large enough - if there not, then you can save the text in a file, or maybe split it up in the database.
User avatar
meander
Forum Commoner
Posts: 26
Joined: Sun Oct 10, 2004 3:09 pm

Post by meander »

oh it wont be to big to fit in the dbase spot, i was wondering which way is more efficient...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's often just fine to use the database to store it in it's in entirity.. most, if not all databases will compress the "text" data automatically for you.
Post Reply