title: Multiple Queries Database
body: <p>I'm new to PHP but am in the process of creating a rather complex work experience database. At current there are two tables (employers, students) Now, I've used:</p>
  <pre><code>&quot;SELECT * FROM employers ORDER BY Category, SubCategory, Name&quot;
  </code></pre>
  <p>to generate a list of employers and their details. However, within this list I need to display which students are with which employers over the course of three weeks. I need to return a 'FirstName' value from 'students' if 'WeekOne' (also a column in 'students') = 'Name' (from 'employers')</p>
  <p>Please help! If this is too garbled let me know - it's pretty difficult to explain.</p>
  <p>Essentially, I want to generate a list that looks a bit like this:</p>
  <blockquote>
  <p>Company One, Address, Week One - Student, Week Two - Student, Week Three - Student</p>
  <p>Company Two, Address, Week One - Student, Week Two - Student, Week Three - Student
  etc</p>
  </blockquote>