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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:20:04+00:00 2026-05-17T16:20:04+00:00

I’m trying to create a drop down select option using PHP, MySQL, and ajadx

  • 0

I’m trying to create a drop down select option using PHP, MySQL, and ajadx I have the PHP and ajax pretty much figured out but I’m stumped on how I should organize my tables I couldn’t decide so I created it both ways:

The first way the tables are:

  • CourseTbl containing (CourseID*, and CourseName)
  • DateTbl, (DateID*, and DatesOffered(entered as a varchar unsure of how to do date to show two day span)
  • LocationTbl (LocationID*, LocationName)

I figured I could try and connect the ID’s for each but realized there is no way to connect them since their are some that repeat dates and some that are offered the same daye.

I also have the a table which just lists all of these together.

TableSelect (ID*, CourseName, DatesOffered, LocationName*)

If I wanted to make it as a drop down select would I have to create a subID that would be and INNER Join? Use an XML with PHP? I just keep asking myself how can I input the information and query it properly?

How is the best way to attack this? any help would be great and thanks for your time!

  • 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-17T16:20:05+00:00Added an answer on May 17, 2026 at 4:20 pm

    It probably would be beneficial for you to store all this data in a single table. The reason I say this is your queries would be a lot less intense (you are not joining on multiple tables) only doing a select from one table then and if you structure your data right you can use the output exactly as is to populate your dropdown boxes.

    An interesting methodology to follow is the one where you try to think of what you want to accomplish first and how the end result is going to look and work. Then you design your DB to accommodate you with this structure.

    I have found that if your DB structure is right and you serve your php script the data as it needs it, your site is amazingly scalable. I mean it makes sense to use a single select rather than a inner join on 3 tables right?

    You would also sit with one set of ID’s and no foreign keys etc to keep data integrity. If I read your explanation right then I see the data relates exactly to each other and its always good to group the same data together.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm trying to select an H1 element which is the second-child in its group
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put

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.