title: #1054 - Unknown column 'cg1.station_id' in 'on clause'
body: <p>when running this script I get the above error:</p>
  
  <pre><code>SELECT s1.Station_Name as Station, s1.St_Town as Town, cg1.CaporGen as Type, ht1.HYDRO_NAME as Typology
  FROM station s1, capacityandgeneration cg1, hydro_type ht1
  JOIN station s2 ON cg1.station_id=s2.Station_ID
  inner join hydro_type ht2 on cg2.hydro_type_id=ht2.type_id;
  </code></pre>
  
  <p>but when I remove the 3rd table it works fine:</p>
  
  <pre><code>SELECT s1.Station_Name as Station, s1.St_Town as Town, cg1.CaporGen as Type
  FROM station s1, capacityandgeneration cg1
  JOIN station s2 ON cg1.station_id=s2.Station_ID;
  </code></pre>
  
  <p>I've tried various permutations with column aliases but constantly get the above error. Please show me the error of my ways as I'm baffled at the moment.</p>
  
  <p>Cheers Simon</p>