Using text type when reading online information affects efficiency
What field type is generally used to store the image and text format
Using text type when reading online information affects efficiency
What field type is generally used to store the image and text format
Both
text
and longtext
are fine.
This light forum uses UEditor. In its "posts" data table, the fields that store the content of posts are as follows:
<code>`Content` longtext CHARACTER SET utf8,</code>
The content generated by ueditor comes with a lot of tags and styles, and is generally stored in text. It is recommended to upload images to a cloud server (such as Qiniu) to prevent too many images from taking up too much of your own database space. Your own database only needs to be stored Just access the link
Customized according to specific business scenarios. If the content length exceeds the maximum varchar type character length, you can use text. If there are pictures, store them according to the actual scenario