I have two tables, one is signups and contained in it are two fields, firstchoice, and secondchoice. Another is a schedule table, and it has things like a begin and end date, and a semesterid. firstchoice and secondchoice from the signups table both reference the semesterid from the schedule table. I am trying to create a page which displays all of the registered people and the schedules they have registered for (the begin and end dates), and my current query:
$query = "SELECT * FROM signups INNER JOIN (schedule) ON signups.firstchoice=schedule.semesterid AND signups.secondchoice=schedule.semesterid";
is not returning any results from the schedule table. Is it possible to join two tables like this, with two columns on one table referencing a single column on another?