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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:22:11+00:00 2026-05-25T17:22:11+00:00

I have a social app that has a user_profile table with typical standard fields,

  • 0

I have a social app that has a user_profile table with typical standard fields, such as

user_id (unique)
name

I want to allow users to share among themselves information saved in a separate table called info, which has these fields:

user_id_fk
agent_name
agent_phone
agent_address

So the idea is that if I’m user #1 and you’re user #6 – I can authorize you to see the data in my info table. Then when you view my profile, a PHP function checks if you’re authorized and shows a button linking to a page with my info.

My question is: what would be the best way to implement this?

I thought of some solutions but would like your opinion:

[1] create a new field in user_profile called info_access, which would contain a comma separated string containing all users that authorized access. The obvious downside are the limitations of such strings (eg, very difficult to delete a user_id if access to info is revoked, not normalized, etc)

3,23,14,12,11

[2] create a new table called info_access which would look like this:

user_id_fk    can_access
6             3              
6             23
6             14
6             12
6             11

In this case I would query as

select * from info_access where user_id_fk = 6

but am unsure how to code the PHP function to check if I will see the button when visiting the profile of someone who authorized me to view the info.

Any suggestions on the schema/code?

  • 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-25T17:22:12+00:00Added an answer on May 25, 2026 at 5:22 pm

    Second approach is the best approach for your problem. Then you can query info_access table to check whether a record for user id of the viewing profile and the user id of the viewer is exists in the info_access table.

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

Sidebar

Related Questions

I'm writing a social networking app that has contacts sync functionality. I have working
I am building a social app that has a chatView. Message is an entity.
I have a smaller web app that republishes content from one social source to
I have a rails app that is tracking social data. The users are going
I'm working on a social networking system that will have comments coming from several
Right now I have this social media app, where I'm implementing ratings on users
We have a social networking site where people have contacts and we want it
The apps that I build frequently have 'social media service' requirements; e.g. Twitter bit.ly
I'm building a social media app in Flash (AS3) that is tightly integrated with
I have a BizTalk 2006 app which has a sendport using MSMQ. I have

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.