mysqltextareacolumn-types

DB or flat file?


Just one little question. Shall i put the HTML textarea content into a DB or a flat file? The textarea content can be very long (like an article or a project).

Thanks for helping. Silvio.


Solution

  • Use text type instead of string, varchar type in db.

    Note:-Text fields in mysql are limited to 65kb

    EDIT

    OR You should look at using MySQL's LONGBLOB or LONGTEXT data type. They can store up to 4 gigabytes of binary or textual data, respectively.