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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:13:58+00:00 2026-05-22T01:13:58+00:00

I have a table with timeslots that users can sign up for. On the

  • 0

I have a table with timeslots that users can sign up for. On the administrative end, the admin-user can choose to ‘link’ two timeslots together, which basically says to the end-user, ‘If you sign up for one of these timeslots, you must sign up for all other timeslots that are linked to it.’ These links are stored in another table which has two columns, one being the ID of the timeslot requiring a link, and the other being the ID of the timeslot that is being linked to.

How can I make it such that when linking one timeslot with another, BOTH depend on the other being selected. This needs to be recursive for other linked timeslots as well, like the following example:

Admin says:

#1 is linked to #2
#3 is linked to #2

Therefore:

#1 is linked to #2
#2 is linked to #1
#3 is linked to #2
#2 is linked to #3
#3 is linked to #1
#1 is linked to #3

What is the best way to accomplish this? Right now I’m trying to put that information into a link table, but if there’s another way that I can do it with more PHP and less SQL that would work also. I would provide a code sample, but I don’t think that it would be helpful.

Edit: Conceptual answers are fine. I don’t need code written for me unless for demonstrative purposes.

  • 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-22T01:13:59+00:00Added an answer on May 22, 2026 at 1:13 am

    One approach may be a table of two columns in the form of: Node_Id, and Link_Id.

    In this case, Node_Id is the Timeslot ID. For the example above, the rows would be:

    1    1
    2    1
    3    1
    

    Where 1, 2, 3 in the first column are timeslots, and the 1 in the second is the link.

    Hypothetically let’s add timeslots 4, 5, 6, 7, and 8 with links 2, 3, and 4.

    4    2
    5    3
    6    2
    7    4
    8    2
    

    This translates to:

    Pick 4, must also pick 6 and 8 (all are link 2).
    Pick 5, you're done (only member of link 3).
    Pick 6, must also pick 4 and 8 (all are link 2).
    Pick 7, you're done (only member of link 4).
    Pick 8, must also pick 4 and 6 (all are link 2).
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have table with two fields competition {stateTime, endTime} when i insert to that
I have table A in Oracle that has a primary key (id). I need
I have table that I insert data with following query (from c# code): INSERT
I have a table that need to store Timeslot such as 10:00 AM PST,
I have table in an MS Access database that looks like this: ID Symbol
I have table v_c_country with column table_name I can make an query and, as
I have table of user actions, each having a user associated, a type, and
I have table with ajax paging, i can select any page and view data,
I have table that uses inline editing with ajax to modify the fields. The
I have a website where you can choose a timeslot via a dropdown box.

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.