title: MySQL, SQL, PHP can I bring data from two tables joined by a third
body: <p>I've got an issue
  I have 3 tables:</p>
  
  <pre><code>1 table named "members" (it has the members data, ID, Username, Password)
  2 table named "schools" (it has list of schools ID, School_Name, School_Number)
  3 table named "members_schools" (Here I two columns: User_ID, School_ID)
  </code></pre>
  
  <p>so I'm in a middle of a mess, I need to realize a sorting or grouping system
  for example:
  School Of St.Peter, Number 8, has an ID 1 in "schools" table</p>
  
  <p>users have the right to choose ,from a list, this school and then I made a query to save their choice in "members_schools" something like:</p>
  
  <pre><code>User_ID  ::  Scool_ID
  4        ::   1
  </code></pre>
  
  <p>This should bring back that: the user with ID:4 is attending the school with ID:1 which is here "School Of St.Peter"</p>
  
  <p>now I tried to LEFT JOIN the tables among each others, but so far no luck!! I'm confused how to realize this thing, retrieving the data from the three tables and show them on a page in this order.</p>
  
  <pre><code>School               ::     No. Attenders
  School Of St.Peter   ::     "NUMBER OF MEMBERS WHO HAVE APPLIED FOR THIS SCHOOL"
  </code></pre>
  
  <p>Thank you guys.</p>