Tauciokas
Tauciokas

Reputation: 99

Storing articles in MYSQL data types

I'm doing this test project of my own. I'm new to web development and need a little advice. I know to store articles you need to use TEXT or some people use BLOB. Which is better?

Also, in order to properly style articles, what can I do? Change Storage engine? Maybe there is one that interprets HTML? Like paragraphs <p> and headers <h1>. Maybe even <br>?

Upvotes: 3

Views: 887

Answers (1)

GolezTrol
GolezTrol

Reputation: 116110

It depends on the format of the document. If it is HTML, RTF or Plain text, you can use TEXT. For Word documents, PDF's and other binary formats, use BLOB. When mixing the two, use BLOB as well. BLOBS can contain text data, but TEXT might not handle all binary data correctly.

Upvotes: 3

Related Questions