What is difference between longblob and longtext in mysql?
What should I use to save a long topic ?
What is difference between longblob and longtext in mysql?
What should I use to save a long topic ?
BLOBs are for Binary Large Objects. If you're storing binary data in your DB, then BLOB would be the table type you want. Otherwise.. longtext.
In your case longtext.
BLOB and TEXT are basically identical, except that TEXT fields have character set translation rules applied. BLOB fields do not. So with BLOB what you put in is what you get. With TEXT, what you put may not be what you get out.
You can use collation & character sets on TEXT
columns, which would mean that:
TEXT
column is (for instance,latin1
column, utf-8
requested), MySQL will convert the contents to the required charset.TEXT
columns based on collation.BLOB
's are just 'binary sequences', and you'll get them 'as is'.