Skip navigation
Currently Being Moderated

Search Many to Many tables

Jun 24, 2011 4:35 AM



I am developing a site to keep track of staff members and training at the local rugby club. I have constructed a data base to hold information about all members of staff, this included any training courses, medical conditions, disabilities and roles.


As each of these categories (training courses, medical conditions, disabilities and roles) can be expaned and each member of staff may have more than one of each, I decided to use a many-to-many table construction. here is a basic layout of the tables:



My client wants a search engine that will allow them to search for any member of staff that have completed a specific course (courses table) and/or is a First Aider (roles table) and/or who's CBR check (staff) is about to expire.


I know I will have to build a multi selection page with drop menus but I have no idea how to use the information to construct a query that will utilise all of the required relationship tables and extract the staff that meet the search criteria.


Any help or pointers in the right direction would be great, I am only beginning to understand SQL/PHP so please keep this in mind.


Is this even possible (searching across this many tables)??????




More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points