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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:02:37+00:00 2026-05-13T13:02:37+00:00

If you allowed people to determine who could view their user information, what would

  • 0

If you allowed people to determine who could view their user information, what would be the best way in which to store and access that information?

They would be setting their preferences in any of these ways:

  • User Based (select specific users – ie. Block: “Munch”, “Dummy”)
  • Checkbox Based (select one or many groups of users – ie. “My Friends”, “Anyone in my Network”)
  • Radio Button Based (select only one group of users – ie. “Everyone”)

My current thought is that, because the information is relevant to the user being viewed and not the one clicking around the site, you would have to store these options in a database, and based on the any particular combination of results, run a certain query.

The only issue is there could be a seemingly huge number of different queries:

  • 7 checkboxes could have up to 128 different combinations (2^7)
  • 128 combinations = 128 different optimized queries

This does not seem to be efficient in either time spent writing the queries or in the amounts of queries for every page view (querying to get another query to run…blech!).

And because I’m sure this has been done before, I feel like I must be overlooking something. Is there a better way to do this using PHP/MySQL?

  • 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-13T13:02:38+00:00Added an answer on May 13, 2026 at 1:02 pm

    I would precalculate results into a table of ‘can not views’, ie if usera in some form blocks userb (directly or because hes in a group), the table gets a record saying just that. its the age old one of doing the heavy lifting on writing rather than reading.

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

Sidebar

Related Questions

I had an issue with my game that allowed people to easily fake their
If I set up a central Mercurial Repository where certain people are allowed to
I have a WordPress install in which registered users are allowed to post articles.
So I only want the logged in user to be allowed to book holidays
In Internet Cafes where people are allowed to print, sometimes they print more pages
I have a webapp where by people are allowed to upload files, the webapp
My web-app has this secret place only some people are allowed to use. When
I'm trying to make a compiler for my game (so that people could do
Background: I have a website where people can store transactions. As part of this
I have a website where only a couple of people can access it, so

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.