title: Mysql query rand() and order by
body: <p>Hi i'm trying to get some random results ordered by the location ASC.</p>
  
  <p>This is my query:</p>
  
  <pre><code>SELECT `location`, `route`
  FROM (`foo`)
  WHERE `location` != ''
  ORDER BY  RAND(), `location` ASC
  LIMIT 8 
  </code></pre>
  
  <p>the problem is that it gets randomly but doesn't orders then by "location" ASC, also if i do this:</p>
  
  <pre><code>SELECT `location`, `route`
  FROM (`foo`)
  WHERE `location` != ''
  ORDER BY  `location` ASC,RAND()
  LIMIT 8 
  </code></pre>
  
  <p>it doesn't gets randomly.</p>
  
  <p>How can i get both togheter <code>RAND()</code> and <code>ORDER BY location ASC</code>  ?</p>