I need to store the articles which are submitted by my website users.
1.The articles will be 100 to 200 lines in length.
2.The articles will have html tags.For example:
"<br>"
Tell me which "TYPE" should i select when creating the Column in the MYSQL Database and tell me the "LENGTH" too.
I tried VARCHAR but it is not working.
A Binary Large Object ( BLOB ) is a MySQL data type that can store binary data such as images, multimedia, and PDF files.
BLOB Datatype in MySQL In MySQL, the BLOB data type represents a binary large object and can be used to store binary media data, such as audio or video links, images, or files.
In most circumstances, VARCHAR provides better performance, it's more flexible, and can be fully indexed. If you need to store longer strings, use MEDIUMTEXT or LONGTEXT, but be aware that very large amounts of data can be stored in columns of these types.
MySQL stores each database (also called a schema) as a subdirectory of its data directory in the underlying filesystem. When you create a table, MySQL stores the table definition in a . frm file with the same name as the table. Thus, when you create a table named MyTable , MySQL stores the table definition in MyTable.
Use TEXT or MEDIUMTEXT or LONGTEXT column types
TEXT column can store 65,535 characters MEDIUMTEXT can store 16,777,215 characters LONGTEXT can store 4,294,967,295 characters
Please note that, if characters are multi-byte characters (like UTF-8), then these numbers are less.
use TEXT
type when storing long text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With