title: SQL Join Query multiple One-to-many? or many-to-many?
body: <p>Hopefully this will be an easy question!</p>
  
  <p>I have two tables, a 'client(s)' table and an individual 'names' table. The basis is that a client can have one or two(max) names. I structured them like this so that each 'name' can have a different title. The tables are:</p>
  
  <pre><code>clients
  +------------+-------------+------------+
  | clientID   | nameID1     | nameID2    |
  +------------+-------------+------------+
  |          1 | 1           | 2          |
  |          2 | 3           |            |
  |          3 | 4           |            |
  +------------+-------------+------------+
  
  
  names 
  +------------+-------------+------------+------------+
  | nameID     | surname     | initials   | titleID    |
  +------------+-------------+------------+------------+
  |          1 | Banks       | P          | 1          |
  |          2 | Smith       | W          | 2          |
  |          3 | Wilson      | BT         | 2          |
  |          4 | Jefferson   | JP         | 3          |
  +------------+-------------+------------+------------+
  </code></pre>
  
  <p>Where titleID is retrieved from...</p>
  
  <pre><code>titles 
      +------------+-------------+
      | titleID    | titleName   |
      +------------+-------------+
      |          1 | Mr          |
      |          2 | Mrs         |
      |          3 | Miss        |
      +------------+-------------+
  </code></pre>
  
  <p>So for instance clientID = 1 is Mr P Banks '&amp;' Mrs W Smith</p>
  
  <p>The problem is I'm not familiar with querying to get that answer above.</p>
  
  <p>I cannot try:</p>
  
  <pre><code>SELECT
  clientID, names.surname, names.initials, titleName
  FROM clients, names, titles
  WHERE titleID = titleID AND
  NameID1 = nameID AND
  NameID2 = nameID
  </code></pre>
  
  <p>How do I correctly join the tables in a query to find, e.g.,
    <code>clientID 1 = Mr P Banks '&amp;' Mrs W Smith</code></p>