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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:47:53+00:00 2026-06-13T06:47:53+00:00

I don’t want to post the PHP code yet because I really don’t think

  • 0

I don’t want to post the PHP code yet because I really don’t think I have the best way of doing this.

Anyway here is what I am looking to accomplish.

I have a “classlist” table that has instructor led class information – including region and classtype.

I have “regions” table and a “classtype” table. Right now people are able to choose their region or classtype from a drop down – works great.

But they want the option to choose multiple regions and classtypes – and these have to be search/sortable. So when someone logs on they only see classes in their region by default.

I have created a helper table “regionhelper” that has fields – regionhelperid, regionid, and classlistid. I am able to add multiple regions to a class — works great.

But I would like the end-user to be able to see a select box with all of the regions and by them choosing 3 of the 12 regions they would update 3 rows on the regionhelper table. Right?

If my process behind this is right how do I update multiple rows at once on a different 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-06-13T06:47:54+00:00Added an answer on June 13, 2026 at 6:47 am

    You don’t have to have a region helper table to store the extra regions. You can comma separate the regions in the DB then use explode() to iterate over them and get each region. This saves the complexity of having multiple tables unnecessarily.

    E.g Paris,Nairobi,Montevideo

    To get the individual regions during data retrieval, you can simply use:

        //Query to fetch region's field data for that user
    
         $data = explode(',', $regions);
    
        //The $data then stores the values in a numerically indexed array
        //So $data[0] = Paris
        //$data[1] = Nairobi
        //$data[2] = Montevideo    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't think my virtualhost is working correctly. This is what I have inside of
Don't think this is a repost, difficult to search for the word between because
don't know better title for this, but here's my code. I have class user
I don't know why, but this code worked for me a month ago... maybe
Don't think that I'm mad, I understand how php works! That being said. I
Don't they both have to convert to machine code at some point to execute
Don't overthink this - there's a very commonly used term and I ... have
Don't understand this simple code: def main(): print (This program illustrates a chaotic function)
Don't know if this has been answered before. Have custom routes to users. If
Don't ask me why but i can't use this method because I need to

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.