Here is the scenario,
I am using MVC(Model,View,Controller) structure in my application.The platform which I am using isCake PHPand my database is in mysql.
I am allowing the user to make changes in an element of the page,mainly div element/container.I will achieve the goal by using Ajax and JQuery,but the main question is of saving the changed content.
I have though of saving the entire html code in the database but I am not quiet sure about the retreiving part of it..
So need suggestion on this topic,regarding the way of appoarch that I should use.
If I should use database for saving the contents then which of the two datatype(text or thumbblob) is better for such a field.
Any Help would be highly appreciated.
解决方案Since all HTML is text, I see no advantage to using a datatype reserved for binary information. Even images are sent using text based formats in http/https. The only advantage to storing it in binary is that you will use less space, but you will also have to encode and decode the binary information for use in http/https. Overall, it is not worth the hassle you will encounter, in my opinion.