Jump to content

Suggestion for Database


fusionpixel

Recommended Posts

I am creating a basic CMS and everything is working flawlesly but there is a new catch. One of the sections of the CMS will be a QA section where the user will be able to add/edit/delete basic QA section. for example something like this would be rendered on the HTML

 

Q: blah?

A: ander to blah

 

I have the QA inside a single cell and I know it is awful so I am debating what would be the best way to handle this. My first thought is to create a table and add the Q and A rows as necessesary but keeping it independent from the whole QA. but I am sure there is a more elegant way to handle this. Of course I don't want to fix what is not broken but I really want to improve what is already fixed.

 

TIA.

Link to comment
Share on other sites

a, so all in one FIELD. i would do multiple fields, but the same row.

 

Table Name: FAQ

faq_id INT AUTO_INCREMENT

faq_q TEXT

faq_a TEXT

faq_added_dttm DATETIME

faq_updated_dttm DATETIME

 

So you would add more fields instead of more rows in a different table? not sure if that is practical unless I am missing something important here :)

Link to comment
Share on other sites

a, so all in one FIELD. i would do multiple fields, but the same row.

 

Table Name: FAQ

faq_id INT AUTO_INCREMENT

faq_q TEXT

faq_a TEXT

faq_added_dttm DATETIME

faq_updated_dttm DATETIME

 

So you would add more fields instead of more rows in a different table? not sure if that is practical unless I am missing something important here :)

 

no...each Question/Answer combination would be a row in that table structure

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.