fusionpixel Posted November 30, 2008 Share Posted November 30, 2008 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 More sharing options...
rhodesa Posted November 30, 2008 Share Posted November 30, 2008 What is awful about having a Q & A in one row? Link to comment https://forums.phpfreaks.com/topic/134815-suggestion-for-database/#findComment-702053 Share on other sites More sharing options...
fusionpixel Posted November 30, 2008 Author Share Posted November 30, 2008 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... Link to comment https://forums.phpfreaks.com/topic/134815-suggestion-for-database/#findComment-702091 Share on other sites More sharing options...
corbin Posted November 30, 2008 Share Posted November 30, 2008 Sounds to me like you need to look into database normalization. Link to comment https://forums.phpfreaks.com/topic/134815-suggestion-for-database/#findComment-702138 Share on other sites More sharing options...
rhodesa Posted November 30, 2008 Share Posted November 30, 2008 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 Link to comment https://forums.phpfreaks.com/topic/134815-suggestion-for-database/#findComment-702261 Share on other sites More sharing options...
fusionpixel Posted November 30, 2008 Author Share Posted November 30, 2008 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 https://forums.phpfreaks.com/topic/134815-suggestion-for-database/#findComment-702399 Share on other sites More sharing options...
corbin Posted November 30, 2008 Share Posted November 30, 2008 Fusion what is/are your table schema(s)? Link to comment https://forums.phpfreaks.com/topic/134815-suggestion-for-database/#findComment-702534 Share on other sites More sharing options...
rhodesa Posted November 30, 2008 Share Posted November 30, 2008 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 https://forums.phpfreaks.com/topic/134815-suggestion-for-database/#findComment-702601 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.