Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8632643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:22:50+00:00 2026-06-12T09:22:50+00:00

on my website I will be allowing users to insert text into multiple WYSIWYG(TinyMCE)

  • 0

on my website I will be allowing users to insert text into multiple WYSIWYG(TinyMCE) text fields. Each field has a title which will be used for navigation and for general identification.

Whats being entered into the database:
Multiple: text from input (max 255 char)
Multiple: HTML/text from WYSIWYG Editor(no max set)
(could be as many as 20 or so text&textfield’s)

My Question is: What is a proper way to set up my database to handle the user generated content(should I make 20 columns for text or something other)? And in what form should I send it to the database(just lump it all into an array and send it to database or what)? And should I limit how much text can be in each textfield?

Using: Using phpMyAdmin
Also using CodeIgniter as my php framework

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:22:51+00:00Added an answer on June 12, 2026 at 9:22 am

    You left a lot of requirements unstated, so it’s hard to be specific.

    But here’s what I would do if I were working in MySQL.

    POST table:

     post_id    int      primary key   an id number
     field      int      not null      which of the 20 or so text fields this goes with
     user_id    int      not null fk   the user making the post
     active     tinyint                1 = active   2 = invisible to users (deleted)
     (other identifying data as needed)
     posttime   datetime not null      when the post was first created
     edittime   datetime not null      when the post was most recently changed 
                                        (if never changed, the same as posttime)
     title      varchar                text of the post's title
    

    POSTTEXT table

     post_id      int       part of primary key
     posttext_id  int       part of primary key 
     posttext     text      part or all of the post's text
     active       tinyint   1 = active   2 = invisible to users (deleted)
    

    So, each post will have one row in POST, and zero or more rows in POSTTEXT. Most posts will have only one row in POSTTEXT, but extra long posts may have several. POSTTEXT.post_id is a foreign key pointing back to POST.post_id. posttext_id is a number that counts up from zero for each distinct post.

    Why, you ask, not just put the posttext column in the POST table? Well, if you are sure you will never need to have your users page through very long posts, you can do this. Your schema will be a lot simpler. But if you’ll have a lot of hundred-thousand-word posts in the system where the user may want to view the nth page of text, then the two-table solution will work better.

    This kind of thing will perform much better than a table with multiple text columns for multiple fields. In RDMS work, you’re almost always better off handling multiple similar rows than you are really wide rows with lots of columns.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a website that will be using Facebook Connect to authenticate users.
I am developing a website, where I am allowing users to upload videos, but
I'm re-writing a website that will support multiple skins. Currently, I'm just planning on
We are in the process of making our website international, allowing multiple languages. I've
I want that each user on my website will have an image in his
I am creating an website that will allow users too create there own blog/Content
I need to create website that will support multiple languages, however I never done
A customer has asked us to a add a feature to his website allowing
I have a form that the users for my website will fill out. Once
Scenario: Every page on the website will have a menu bar at the top

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.