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

  • Home
  • SEARCH
  • 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 5928461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:17:42+00:00 2026-05-22T14:17:42+00:00

I have the following issue: I’m creating a form to register users on an

  • 0

I have the following issue: I’m creating a form to register users on an application and within the different input types there are a couple of checkboxes regarding the language the user speaks. Now since the user might speak more than just one language I was wondering how is that handled in the db? Should I have lang1, lang2, lang3…etc as rows in the ‘users’ table?

  • 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-05-22T14:17:42+00:00Added an answer on May 22, 2026 at 2:17 pm

    Should I have lang1, lang2,
    lang3…etc as rows in the ‘users’
    table?

    That’s not a good idea. The table structure should be something like this:

    user
    -------------
    | id | .... |
    
    language
    -------------
    | id | name |
    
    user_language
    -------------------------
    | user_id | language_id |
    

    Then to, for example, get the user’s language choices, this mock query would work:

    SELECT language.name as language
    FROM user
    INNER JOIN user_language ON user_language.user_id = user.id
    INNER JOIN language ON language.id = user_language.language_id
    WHERE user.id = $id
    

    This means you can update the language names and the name update will happen transparently without you having to worry about editing it in all instances of the user table. This method also allows you to assign as many languages as you want for the user.

    EDIT:

    Take for example if language is English and Spanish (id 1 and id 2), and the User’s ID is 1. In order to associate the user with the languages:

    INSERT INTO user_language (user_id, language_id)
    VALUES(1,1); <-- Associate user with English (id 1)
    INSERT INTO user_language (user_id, language_id)
    VALUES(1,2); <-- Associate user with Spanish (id 2)
    

    Now, this assumes that you’re populating your available languages with the values in the language table, with the value of the field being language.id, and the display of the field being language.name.

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

Sidebar

Related Questions

I have the following issue: when a stored proc is called from my application,
I have the following issue: I have a MVC application, in some action of
I have the following issue, I have an array with the name $data Within
I have the following issue. I have deployed a smart client application to several
I have the following issue: I want to create a method which accepts input
I have the following issue, Im creating a windows 7 gadget, which uses Iframe
I have following issue: I'm introducing new feature into application (run as Windows Service)
I have a following issue - I'm using jQuery to add additional input forms
I'm developing a windows forms application. And i have the following issue: in a
I have the following issue using java 1.4 I try to display a very

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.