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
https://forums.phpfreaks.com/topic/134815-suggestion-for-database/
Share on other sites

because the whole row gets dumped to the user in a textarea where the user edits everything there. While it works I am thinking of creating a more elegant solution where the user can order each qa/add/delete/publish which I started with its own table...

 

 

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 :)

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.