title: sql query order by multiple CAST value int
body: <p>i'm trying to run this in sql query, but not working. I tried single cast, it works fine, but when i tried to add two cast, it gives error </p>
  
  <blockquote>
    <p>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM useradvert WHERE optionsalerent='For sale' ORDER BY cast (<code>rm</code> as signed)' at line 1</p>
  </blockquote>
  
  <p>This query below works.</p>
  
  <pre><code>SELECT * FROM popol WHERE optsale='For sale' ORDER BY cast(rm as signed) ASC
  </code></pre>
  
  <p>THis one doesn't work</p>
  
  <pre><code>SELECT * FROM popol WHERE optsale='For sale' ORDER BY cast(rm as signed) ASC, cast(salary as signed) ASC
  </code></pre>
  
  <p>I need to output both rm and salary rm. Both are integer values. Tqs in advance.</p>