title: Laravel: 1066 Not unique table/alias
body: <p>I have two queries in my controller</p>
  
  <pre><code>if (isset($input['council']) &amp;&amp; $input['council'] != '')
  {
    $query = $query-&gt;join('suburb_near', 'titles.suburb', '=', 'suburb_near.suburb')
      -&gt;select(array('titles.*', 'suburb_near.suburb' , 'suburb_near.council'))
      -&gt;where('council', 'like', '%'. $input['council'].'%')
      -&gt;orderBy('views', 'desc');
  }
  if (isset($input['country']) &amp;&amp; $input['country'] != '')
  {
    $query = $query-&gt;join('suburb_near', 'titles.suburb', '=', 'suburb_near.suburb')
      -&gt;select(array('titles.*', 'a.suburb' , 'suburb_near.country'))
      -&gt;where('country', 'like', '%'. $input['country'].'%')
      -&gt;orderBy('views', 'desc');
  }
  </code></pre>
  
  <p>If I run either independently they run fine.  But if I run both together, I get an error:
  1066 Not unique table/alias</p>
  
  <p>How should I change this?</p>