title: codeigniter, get the maximum value in mysql table column
body: <p>i'm using codeigniter 2.<br>
  i've a mysql table column storing the time taken for each student.<br>
  eg. 1.2327, 0.6547, 1.9876  </p>
  
  <p>i want to get the max. value that column.  </p>
  
  <p>This is my code:  </p>
  
  <pre><code>$this-&gt;db-&gt;select_max('time_taken', 'time');
  $result = $this-&gt;db-&gt;get('students');  
  echo $result-&gt;row()-&gt;time;
  </code></pre>
  
  <p>when i echo the result, it give me a value of 2(correct value should be 1.9876).<br>
  What is the correct way to get this value i need, thanks?</p>