title: Mysql table join records from 2 tables but get all records even the ones with empty fields
body: <p>I have 2 tables and want to get all records from table '<strong><em>klanten</em></strong>' and where the '<strong><em>automaten</em></strong>' records are matching <em>bedrijfs_id</em>.</p>
  
  <p>this is what i have so far.</p>
  
  <pre><code>$sql = "
  SELECT 
  `automaten`.automaat,
  `automaten`.th_nummer, 
  `klanten`.bedrijf, 
  `klanten`.bedrijfs_id, 
  `klanten`.plaats 
  FROM klanten, automaten 
  WHERE (`klanten`.bedrijfs_id = `automaten`.bedrijfs_id) 
  ORDER BY `klanten`.bedrijf ASC 
  ";
  </code></pre>
  
  <p>resultin in:</p>
  
  <pre><code>+------------+-------------+-----------+--from automaten--+------------+
  153509       |  Amigo      | Smilde    |  Hot Rocks       |  6170155   |
  153509       |  Amigo      | Smilde    |  Cash Attack     |  6410031   |
  153512       |  Boekanier  | Steenwijk |  Red Hot Active  |  6980051   |
  153512       |  Boekanier  | Steenwijk |  Turboplay       |  6550298   |
  -----------------------------------------------------------------------
  bedrijfs_id  |  bedrijf    | plaats    |  automaat        |  th_nummer |
  +------------+-------------+-----------+------------------+------------+
  </code></pre>
  
  <p>table klanten
  bedrijf
  bedrijfs_id
  plaats
  adres
  telefoon
  etc.</p>
  
  <p>table <strong>automaten</strong>
  <em>bedrijfs_id</em>
  automaat
  <em>th_nummer</em></p>
  
  <p>so I want to get even the records without any <em>automaat field</em>. (which has to be filled in then<br>
  Comment: improved formatting, corrected spelling
  Mysql table join records from 2 tables but get all records even the ones with empty fields
  I have 2 tables and want to get all records from table 'klanten' and where the 'automaten' records are matching bedrijfs_id.</p>
  
  <p>Still no working solution :(</p>