Home mysql MySQL does not record a large text

MySQL does not record a large text

Author

Date

Category

Text (10,000+ characters) When writing in the database is cut, not entirely written.
Smaller text is written completely.

The text comes to the PHP file via POST, then recorded in the database.
post_max_size = 256m , in MySQL Type is worth TEXT .

What could be the problem? : (


Answer 1, Authority 100%

There are 4 types Text , each of which can place different amounts of data.
If you go with a smaller to more, then it turns out like this:

TinyText, Text, MediumText, Longtext

they can accommodate:

TinyText : 256 bytes.

Text : 65 535 bytes.

MediumText : 16 777 215 bytes.

LongText : 4 294 967 295 bytes.

Translating the last two will turn out like this:

MediumText – 16 MB

LongText – 4 GB

For 10,000 characters, it is enough MediumText

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions