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 4017506
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:52:10+00:00 2026-05-20T09:52:10+00:00

Basically i’ve a table for my users (it’s nightclub website) and now i’m trying

  • 0

Basically i’ve a table for my users (it’s nightclub website) and now i’m trying to improve they privacy.

Until now i just show some information to logged in users, but now i want to give that choose to users.

My question is: What would be the better approach to do it?

What do you recommend me, create a new property for each property that i want users to manage the privacy?

Example of table “Users”:

-Id

-Email

-Phone

-ShowEmail (int) and 0 would be to no-one, 1 to logged in users and 2 to friends

-ShowPhone (int)

It’s a good choose? I’m not quite sure if i should create a new table to handle the privacy settings. I must admit that database design isn’t my specialty so really need some feedback about this.

Thanks!

Edit: the privacy isn’t just about simple properties. I would need to handle the events that the user signed up, photos where user is tagged, etc.

  • 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-20T09:52:10+00:00Added an answer on May 20, 2026 at 9:52 am

    That is a possibility, but it makes your table very large and with kinda redundant fields. You have two options which I personally like better:

    1. Use a flag field. The advantage is that you only need 1 field, the disadvantage that it kinda goes against good relational DB practices and that queries become more vague if you want to select something from it.
    2. use another table with only 3 fields, e.g. “UserID”, “FieldName” and “ShowTo”, the latter being a ENUM (or integer if you like that better). This is more work but is immidiatly clear and imho much better.

    Queries would look something like this:
    1.

    SELECT phone, (privacyFlags&8) AS showPhone FROM users
    

    2.

    SELECT user.phone, privacy.ShowTo AS showPhone FROM users
        JOIN privacy ON privacy.userID=users.userID
    WHERE privacy.FieldName = 'phone'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically I have some code to check a specific directory to see if an
Basically I am trying to restart a service from a php web page. Here
Basically, I'm trying to tap into the Soap pipeline in .NET 2.0 - I
Basically I'm trying to accomplish the same thing that mailto:bgates@microsoft.com does in Internet Explorer
Basically, what I'm trying to create is a page of div tags, each has
Basically, so far I've just got an add and minus button which will change
Basically, I have a table. Onload, I set each row of the table to
basically I'm trying to pass a variable that is defined in a JSON array
basically i have this problem i have a table of posts(in my mysql database)
Basically what I want to do it this: a pdb file contains a location

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.