I want to store HTML and PHP in mysql db, i'm unsure as to what field type i should use TEXT or BLOB?
2 Answers
Yup... that would be funny to search it... and if you do put html into a db, don't plan on using phpMyAdmin, or at least older versions of it. Can make quite a mess.
Generally the "commonality" uses flat-files (like .tpl files) for the html. This keeps your DB clean, and remember large amounts of data in a single field can produce somewhat slow results.
Also For search options, you will have to write code to surpass any html tags from the text. This can be done but needs to be coded properly.