title: Unknown column in 'order clause'
body: <p>I am using this sql request:</p>
  
  <pre><code>SET @C := 0;
  
  SELECT _s.*, @C := @C + 1 AS `number` FROM `server` _s
  INNER JOIN servers_services _ss ON (_s.id = _ss.server_id)
  INNER JOIN service _s2 ON (_ss.service_id = _s2.id)
  WHERE _s.is_vip != 0 AND _s.is_hidden != 1 AND _s.is_banned != 1
  
  UNION
  
  SELECT _s.*, @C := @C + 1 AS `number` FROM `server` _s
  INNER JOIN servers_services _ss ON (_s.id = _ss.server_id)
  INNER JOIN service _s2 ON (_ss.service_id = _s2.id)
  WHERE _s.is_vip != 0 AND _s.is_hidden != 1 AND _s.is_banned != 1
  
  ORDER BY _s2.priority DESC
  </code></pre>
  
  <p>output error:</p>
  
  <blockquote>
    <p>1054 - Unknown column '_s2.priority' in 'order clause'</p>
  </blockquote>