hi i would like to store the data of a text area inside mysql, and for that i want a suitable dtatype

For eg if the data in textarea is

hello hie are you
i'm fine!

currently i'm using varchar but th eproblem is that the data apperas in single line like ,

hello how are youi'm fine.

9 Years
Discussion Span
Last Post by nav33n

Depends upon how much data you would want to store. varchar is a choice, tinytext - max 255 chars, text - max 65535 chars are other options. There are also mediumtext and longtext .
Choose according to your needs. A complete summary of MySQL field types can be found here


When adding the data to the table, use nl2br function (if you are using php).

ok so if i use ths function....will i get the data in the same format whn pronting bak to texarea???

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.