Click here to Skip to main content
15,888,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here is the scenario,

I am using MVC(Model,View,Controller) structure in my application.The platform which I am using is Cake PHP and 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.
Posted
Updated 13-Jan-12 18:56pm
v2

1 solution

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.
 
Share this answer
 
Comments
Vinay Indoria 15-Jan-12 5:55am    
Hi jinzai,
Thanks for your opinion.You are right its not worth the hassle.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900