If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Storing content with html tags in db

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-27-10, 15:27
DevilsAdvocate DevilsAdvocate is offline
Registered User
 
Join Date: Apr 2010
Posts: 24
Storing content with html tags in db

I'm hoping you guys can shed some light on this.

I'm writing a quiz program. I'm pulling questions and answers from a db. Some answers require a checkbox, some a text input, etc. So instead of writing a decision block to determine what type of input tags are needed, I was wondering about storing the content (answers in this case) with their needed html tags in the db instead, so when I iterated through the answers query, each answer would come with its needed input tags.

I'm wondering if I can get your opinions, any known standards/problems, etc. for storing content with html tags in the database.

Thanks in advance for reading.
__________________
DevilsAdvocate
------------------------
The elephant in the room
------------------------
Ordo ab chao
Reply With Quote
  #2 (permalink)  
Old 04-27-10, 18:22
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
storing content with html tags in the database is fairly common

for example, many CMS (content management systems) do this

however, for your application, it isn't necessary

different answer types will be stored differently based on their inherent data contents, and not based on the html which displays them
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On