title: Getting the Position of a score while excluding the zero/empty values
body: <p>I have two different codes for getting the position of a student's score in two subjects. From result columns '<em>maths</em>' and '<em>english</em>' containing the scores of different users. </p>
  
  <p><em>This is what the result for a user looks like</em></p>
  
  <p><strong>Subject&nbsp;&nbsp; &nbsp; Score&nbsp;&nbsp; Rank</strong></p>
  
  <p><strong>English&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   &nbsp;7</strong></p>
  
  <p><strong>Maths &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   &nbsp;1</strong></p>
  
  <p><em>While this what I hope to get:</em></p>
  
  <p><strong>Subject&nbsp;&nbsp; &nbsp; Score&nbsp;&nbsp; Rank</strong></p>
  
  <p><strong>English&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   &nbsp;7</strong></p>
  
  <p><strong>Maths &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</strong></p>
  
  <p>Here are the codes I used</p>
  
  <p><strong>FOR ENGLISH</strong></p>
  
  <pre><code>&lt;?php $sql="SELECT roll, FIND_IN_SET( English, (SELECT GROUP_CONCAT( English
  ORDER BY English DESC ) 
  FROM result )
  ) AS rank
  FROM result
  WHERE roll = '$roll'";
  
  $result = mysql_query($sql);
  
  
  $row = mysql_fetch_array($result, MYSQL_ASSOC);
  
  echo $row['rank'] ?&gt;
  </code></pre>
  
  <p><strong>FOR MATHS</strong></p>
  
  <pre><code>&lt;?php $sql="SELECT roll, FIND_IN_SET( maths, (SELECT GROUP_CONCAT( maths
  ORDER BY mathsDESC ) 
  FROM result )
  ) AS rank
  FROM result
  WHERE roll = '$roll'";
  
  $result = mysql_query($sql);
  
  
  $row = mysql_fetch_array($result, MYSQL_ASSOC);
  
  echo $row['rank'] ?&gt;
  </code></pre>